/* Cartes consulaires — compléments à app.css */
.f5 { grid-column: span 5; }
.tabs.tabs-wrap { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
.poste-pill i { background: var(--orange); }

/* Nouvelle demande */
.nd { max-width: 980px; }
.nd-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(16,40,28,.04); }
.nd-card h3 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.nd-card h3 small { font-weight: 400; font-size: 12.5px; }
.rn { min-width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, var(--orange), #ff9a3c); color: #fff; font-size: 13px; font-weight: 800; display: inline-grid; place-items: center; }
.nd-card input:not([type=checkbox]):not([type=file]), .nd-card select, .nd-card textarea { border-radius: 12px; background: #f8faf9; padding: 11px 13px; }
.nd-duo { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
.nd-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.drop { min-height: 150px; border: 1.5px dashed var(--line); border-radius: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; align-content: flex-start; padding: 10px; background: #fafcfb; }
.drop:not(.has) { align-items: center; justify-content: center; }
.drop .hint { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.drop .pg { position: relative; width: 96px; text-align: center; font-size: 11px; color: var(--muted); }
.drop .pg img, .drop .pg .pdf { width: 96px; height: 124px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: #fff; }
.drop:not(.pages) .pg, .drop:not(.pages) .pg img { width: 120px; height: auto; }
.drop:not(.pages) .pg img { height: 150px; }
.pdf { display: grid !important; place-items: center; background: #b42318 !important; color: #fff; font-weight: 800; font-size: 14px; }
.drop .pg button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #b42318; color: #fff; cursor: pointer; line-height: 1; }

/* Suivi d'une demande */
.flow { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.flow .fl { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.flow .fl span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef1ef; color: var(--ink-2); font-size: 12.5px; flex: none; }
.flow .fl.done { color: var(--green-dark); } .flow .fl.done span { background: var(--green-soft); color: var(--green-dark); }
.flow .fl.on { background: var(--green-soft); border-color: #cfe7da; color: var(--green-dark); } .flow .fl.on span { background: var(--green-dark); color: #fff; }
.faces { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.faces figure { margin: 0; }
.faces figcaption { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
img.cr80, .cr80.vide { width: 100%; aspect-ratio: 85.6 / 54; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.14); display: block; }
.cr80.vide { display: grid; place-items: center; background: #f1f4f2; color: var(--muted); box-shadow: none; border: 1.5px dashed var(--line); }
.up3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.upbox { border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: #fafcfb; cursor: pointer; position: relative; color: var(--muted); }
.upbox b { color: var(--ink); font-size: 14px; } .upbox small { font-size: 12px; }
.upbox > input[type=file][data-pdf] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upbox.ok { border-color: var(--green); background: var(--green-soft); }
.upbox .mini { min-height: 56px; display: grid; place-items: center; }
.upbox .mini.has .pg img { width: 140px; height: auto; aspect-ratio: 85.6/54; object-fit: cover; border-radius: 8px; }
.upbox .mini .pg { position: relative; }
.upbox .mini .pg small { display: none; }
.upbox .mini .pg button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #b42318; color: #fff; cursor: pointer; }
.gal { display: flex; flex-wrap: wrap; gap: 12px; }
.gi { position: relative; width: 120px; text-align: center; }
.gi img, .gi .pdf { width: 120px; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.gi small { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.gi form { position: absolute; top: -7px; right: -7px; }
.gi .gx { width: 22px; height: 22px; border-radius: 50%; border: 0; background: #b42318; color: #fff; cursor: pointer; }

/* Impression groupée */
.printbar { position: sticky; top: 64px; z-index: 5; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.printbar [data-go] { margin-left: auto; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ci { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; transition: .15s; }
.ci:hover { border-color: #cfe7da; }
.ci.on { border-color: var(--green-dark); background: #f6fbf8; }
.ci > input { position: absolute; top: 14px; left: 14px; width: 20px; height: 20px; accent-color: var(--green-dark); z-index: 2; }
.ci-faces { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ci-faces img { width: 100%; aspect-ratio: 85.6/54; object-fit: cover; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.ci-txt b { display: block; font-size: 14.5px; }
.ci-txt small { display: block; color: var(--muted); font-size: 12.5px; }
.ci-txt .new { font-style: normal; color: #b45309; font-weight: 600; }
.ci-one { position: absolute; bottom: 12px; right: 12px; }

@media (max-width: 760px) {
  .nd-duo, .faces, .up3 { grid-template-columns: 1fr; }
  .flow .fl { min-width: 0; flex-basis: 45%; }
  .printbar { top: 56px; }
}

/* Informations de la carte */
.face-titre { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--green-soft); }
.carte-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
input.up { text-transform: uppercase; }
input.up::placeholder { text-transform: none; }
.nd-trio { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.drop.sig .pg img { height: 90px !important; width: 180px !important; object-fit: contain !important; background: #fff; }
.fiche { display: grid; gap: 2px; }
.fiche .fr { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.fiche .fr:last-child { border-bottom: 0; }
.fiche .fr span { color: var(--muted); font-size: 12.5px; }
.fiche .fr b { font-weight: 700; letter-spacing: .01em; word-break: break-word; }
.fiche .fr b.vide { color: #c0c8c3; font-weight: 400; }
.cp { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 3px 7px; font-size: 11.5px; cursor: pointer; color: var(--green-dark); }
.cp.ok { background: var(--green-soft); border-color: #bfe3cf; }
.fiche .sep { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); margin-top: 10px; }
@media (max-width: 760px) { .carte-grid, .nd-trio { grid-template-columns: 1fr; } }

/* ---------- Page de connexion : spécimen de la carte ---------- */
.login-duo { width: 100%; max-width: 1060px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 420px); gap: 40px; align-items: center; }
.login-duo .login-box { max-width: none; }
.specimen { min-width: 0; }
.specimen-titre { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.specimen-titre span { font-size: 22px; font-weight: 700; color: #0f6b3a; letter-spacing: -.01em; }
.specimen-titre small { color: var(--muted, #6b7a71); font-size: 13px; }
.flip { position: relative; display: block; width: 100%; cursor: pointer; perspective: 1600px; aspect-ratio: 972 / 615; -webkit-tap-highlight-color: transparent; }
.flip-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, .7, .2, 1); }
.flip.verso .flip-in { transform: rotateY(180deg); }
.flip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4.5% / 7%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 18px 40px -12px rgba(16, 60, 32, .35); }
.flip .flip-f { transform: rotateY(0deg) translateZ(1px); }
.flip .flip-b { transform: rotateY(180deg) translateZ(1px); }
.flip:focus-visible { outline: 3px solid #f77f00; outline-offset: 6px; border-radius: 14px; }
.specimen-pied { text-align: center; font-size: 13px; color: var(--muted, #6b7a71); margin-top: 12px; }
.specimen-pied span { font-weight: 700; color: #e8760a; }
.specimen-etapes { list-style: none; counter-reset: e; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.specimen-etapes li { counter-increment: e; background: rgba(255, 255, 255, .7); border: 1px solid var(--line, #e3e8e4); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.4; color: #3b4a42; }
.specimen-etapes li::before { content: counter(e); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #0f6b3a; color: #fff; font-size: 11px; font-weight: 700; margin-right: 6px; }
@media (max-width: 900px) {
  .login-duo { grid-template-columns: 1fr; gap: 22px; max-width: 460px; }
  .login-duo .login-box { order: -1; }
  .specimen-titre { align-items: center; text-align: center; }
  .specimen-titre span { font-size: 18px; }
  .specimen-etapes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }
