/* =====================================================================
   PolRDV — site public (citoyens)
   Bleu police, verre dépoli, fond vivant et animations.
   ===================================================================== */

:root {
    --blue: #244BA6;
    --blue-dk: #16307a;
    --blue-lt: #4a78e0;
    --cyan: #3fb6ff;
    --ink: #0d1733;
    --muted: #5b6785;
    --line: rgba(36, 75, 166, .14);
    --glass: rgba(255, 255, 255, .72);
    --ok: #0E9F6E;
    --danger: #d92d20;
    --radius: 20px;
    --shadow: 0 10px 40px rgba(20, 40, 110, .14);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: #eef3fd;
    overflow-x: hidden;
}

/* ---------- Fond vivant : dégradés qui dérivent lentement ---------- */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
}
body::before {
    width: 60vmax; height: 60vmax;
    top: -25vmax; left: -15vmax;
    background: radial-gradient(circle, #6f97ff 0%, rgba(111, 151, 255, 0) 65%);
    animation: drift1 22s ease-in-out infinite alternate;
}
body::after {
    width: 55vmax; height: 55vmax;
    bottom: -25vmax; right: -15vmax;
    background: radial-gradient(circle, #8fd8ff 0%, rgba(143, 216, 255, 0) 65%);
    animation: drift2 26s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -10vmax) scale(1.1); } }

/* ---------- En-tête ---------- */
.top {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px clamp(16px, 4vw, 40px);
    background: linear-gradient(120deg, var(--blue-dk), var(--blue) 55%, var(--blue-lt));
    background-size: 200% 200%;
    animation: shine 14s ease infinite;
    color: #fff;
    box-shadow: 0 6px 24px rgba(22, 48, 122, .35);
}
@keyframes shine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}
.brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .6);
    animation: pulse 3s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: .3px; }
.brand small { display: block; font-size: .8rem; opacity: .85; }

.lang {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    padding: 8px 14px;
    border: 1.5px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    transition: background .2s, color .2s, transform .2s;
}
.lang:hover { background: #fff; color: var(--blue); transform: translateY(-1px); }

/* ---------- Mise en page ---------- */
.wrap {
    width: min(760px, 100% - 32px);
    margin: 28px auto 40px;
    flex: 1;
}
.foot {
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
    padding: 20px;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.h1 {
    font-size: clamp(1.7rem, 4.5vw, 2.4rem);
    line-height: 1.15;
    margin: 10px 0 8px;
    letter-spacing: -.5px;
    background: linear-gradient(90deg, var(--blue-dk), var(--blue-lt));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rise .6s var(--ease) backwards;
}
.h1-sm { font-size: clamp(1.3rem, 3.5vw, 1.6rem); }
.h2 {
    font-size: 1.05rem;
    margin: 26px 0 12px;
    color: var(--ink);
    animation: rise .6s var(--ease) backwards;
}
.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 22px; animation: rise .6s .08s var(--ease) backwards; }
.muted { color: var(--muted); margin: 4px 0; font-size: .92rem; }
.center { text-align: center; }

.back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: 6px;
    transition: transform .2s;
}
.back:hover { transform: translateX(-4px); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Étapes ---------- */
.steps {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0 0 22px;
    counter-reset: s;
}
.steps li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    color: var(--muted);
    position: relative;
    text-align: center;
}
.steps li span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--muted);
    position: relative;
    z-index: 1;
    transition: all .3s;
}
.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 2px;
    background: var(--line);
}
.steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done::after { background: var(--ok); }
.steps li.active { color: var(--blue); font-weight: 700; }
.steps li.active span {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(36, 75, 166, .15);
    animation: pop .5s var(--ease);
}
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ---------- Choix (accueil) ---------- */
.choices { display: grid; gap: 14px; }
.choice {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    text-decoration: none;
    color: var(--ink);
    background: var(--glass);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: rise .6s var(--ease) backwards;
    transition: transform .25s var(--ease), box-shadow .25s;
}
.choice:nth-child(2) { animation-delay: .08s; }
.choice:nth-child(3) { animation-delay: .16s; }
.choice:nth-child(4) { animation-delay: .24s; }
.choice::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .7s var(--ease);
}
.choice:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(36, 75, 166, .25); }
.choice:hover::before { transform: translateX(100%); }
.choice-ico {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--blue), var(--blue-lt));
    box-shadow: 0 8px 20px rgba(36, 75, 166, .35);
}
.choice-txt { flex: 1; }
.choice-txt strong { display: block; font-size: 1.08rem; }
.choice-txt small { display: block; color: var(--muted); margin-top: 3px; font-size: .88rem; }
.choice-go { font-size: 2rem; color: var(--blue); transition: transform .25s; }
.choice:hover .choice-go { transform: translateX(6px); }

.info {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(36, 75, 166, .08);
    border-left: 4px solid var(--blue);
    font-size: .92rem;
    color: var(--ink);
    animation: rise .6s .3s var(--ease) backwards;
}
.info strong { display: block; margin-bottom: 4px; }
.info-soft { background: rgba(14, 159, 110, .08); border-left-color: var(--ok); }

/* ---------- Inspecteurs ---------- */
.search {
    width: 100%;
    padding: 15px 18px;
    border-radius: 16px;
    border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, .85);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(36, 75, 166, .12); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--ink);
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(20, 40, 110, .1);
    animation: rise .5s var(--ease) backwards;
    transition: transform .2s var(--ease), box-shadow .2s;
}
.person:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 14px 34px rgba(36, 75, 166, .22); }
.person strong { display: block; font-size: .95rem; }
.person small { color: var(--muted); font-size: .8rem; }
.avatar {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .85rem;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

/* ---------- Créneaux ---------- */
.who {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    animation: rise .6s var(--ease) backwards;
}
.who-ico {
    flex: none;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--blue), var(--blue-lt));
    box-shadow: 0 8px 20px rgba(36, 75, 166, .35);
}
.pill {
    display: inline-block;
    margin: 6px 0 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(36, 75, 166, .1);
    color: var(--blue);
    font-weight: 700;
    font-size: .82rem;
}

.days {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 8px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.day {
    flex: none;
    scroll-snap-align: center;
    width: 68px;
    padding: 10px 0;
    border-radius: 18px;
    border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, .85);
    font-family: inherit;
    color: var(--ink);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s;
}
.day small { font-size: .72rem; color: var(--muted); text-transform: capitalize; }
.day strong { font-size: 1.35rem; }
.day i {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ok);
    color: #fff;
    font-style: normal;
    font-size: .7rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 3px 8px rgba(14, 159, 110, .4);
}
.day:not(.off):hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(36, 75, 166, .18); }
.day.sel {
    background: linear-gradient(160deg, var(--blue), var(--blue-lt));
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 28px rgba(36, 75, 166, .4);
}
.day.sel small { color: rgba(255, 255, 255, .85); }
.day.off { opacity: .35; cursor: not-allowed; }

.slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
}
.slot {
    display: block;
    text-align: center;
    padding: 14px 0;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: var(--blue);
    background: rgba(255, 255, 255, .9);
    border: 1.5px solid var(--line);
    animation: slotIn .45s var(--ease) backwards;
    transition: transform .18s var(--ease), background .18s, color .18s, box-shadow .18s;
}
.slot:hover {
    background: var(--blue);
    color: #fff;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 22px rgba(36, 75, 166, .35);
}
@keyframes slotIn { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 36px 22px; animation: rise .6s var(--ease) backwards; }
.empty .big { font-size: 3rem; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Récapitulatif ---------- */
.recap {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin: 6px 0 18px;
    animation: rise .6s var(--ease) backwards;
}
.recap-when { display: flex; align-items: center; gap: 12px; }
.recap-day {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-lt));
}
.recap strong { display: block; }
.recap-when strong::first-letter { text-transform: uppercase; }
.recap small { display: block; color: var(--muted); font-size: .88rem; }
.recap-who { text-align: right; }

/* ---------- Formulaire (étiquettes flottantes) ---------- */
.form { padding: 22px; animation: rise .6s .1s var(--ease) backwards; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } .recap-who { text-align: left; } }

.field { position: relative; margin-bottom: 16px; }
.field input {
    width: 100%;
    padding: 22px 14px 8px;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, .9);
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.field label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: var(--muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all .18s var(--ease);
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(36, 75, 166, .12); }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field input[type="date"] + label {
    top: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--blue);
}
.field.has-err input { border-color: var(--danger); background: #fff6f5; animation: shake .35s; }
.err { display: block; color: var(--danger); font-size: .8rem; margin-top: 4px; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 10px 0;
    font-size: .92rem;
    cursor: pointer;
}
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); flex: none; }
.check.has-err span { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    background: #fdecec;
    color: #9b1c12;
    border-left: 4px solid var(--danger);
    margin-bottom: 14px;
    animation: shake .4s;
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-lt));
    box-shadow: 0 8px 20px rgba(36, 75, 166, .3);
    transition: transform .18s var(--ease), box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(36, 75, 166, .4); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(36, 75, 166, .4); outline-offset: 3px; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-ghost-danger {
    background: transparent;
    color: var(--danger);
    box-shadow: inset 0 0 0 1.5px rgba(217, 45, 32, .5);
}
.btn-ghost-danger:hover { background: #fdecec; box-shadow: inset 0 0 0 1.5px var(--danger); }

.btn-big {
    width: 100%;
    margin-top: 14px;
    padding: 17px;
    font-size: 1.08rem;
    position: relative;
    overflow: hidden;
}
.btn-big::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: sweep 3.2s ease-in-out infinite;
}
@keyframes sweep { 60%, 100% { transform: translateX(100%); } }
.btn.loading span { opacity: 0; }
.btn.loading::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Confirmation ---------- */
.success { text-align: center; position: relative; margin-bottom: 18px; }
.check-anim { width: 96px; height: 96px; display: block; margin: 6px auto 4px; }
.check-anim circle {
    stroke: var(--ok);
    stroke-width: 3;
    stroke-dasharray: 152;
    stroke-dashoffset: 152;
    animation: draw .7s var(--ease) forwards;
}
.check-anim path {
    stroke: var(--ok);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw .45s .6s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.confetti i {
    position: absolute;
    top: 40px;
    left: 50%;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: burst 1.4s .5s var(--ease) forwards;
}
.confetti i:nth-child(3n)   { background: var(--blue); }
.confetti i:nth-child(3n+1) { background: var(--cyan); }
.confetti i:nth-child(3n+2) { background: var(--ok); }
@keyframes burst {
    0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}
.confetti i:nth-child(1)  { --x: -160px; --y: -40px;  --r: 220deg; }
.confetti i:nth-child(2)  { --x: 150px;  --y: -60px;  --r: -180deg; }
.confetti i:nth-child(3)  { --x: -110px; --y: 90px;   --r: 300deg; }
.confetti i:nth-child(4)  { --x: 120px;  --y: 110px;  --r: -260deg; }
.confetti i:nth-child(5)  { --x: -200px; --y: 30px;   --r: 140deg; }
.confetti i:nth-child(6)  { --x: 210px;  --y: 10px;   --r: -120deg; }
.confetti i:nth-child(7)  { --x: -60px;  --y: -110px; --r: 200deg; }
.confetti i:nth-child(8)  { --x: 70px;   --y: -120px; --r: -240deg; }
.confetti i:nth-child(9)  { --x: -240px; --y: 120px;  --r: 360deg; }
.confetti i:nth-child(10) { --x: 250px;  --y: 140px;  --r: -320deg; }
.confetti i:nth-child(11) { --x: -30px;  --y: 160px;  --r: 180deg; }
.confetti i:nth-child(12) { --x: 40px;   --y: 170px;  --r: -200deg; }
.confetti i:nth-child(13) { --x: -180px; --y: -100px; --r: 260deg; }
.confetti i:nth-child(14) { --x: 190px;  --y: -110px; --r: -160deg; }
.confetti i:nth-child(15) { --x: -130px; --y: 160px;  --r: 120deg; }
.confetti i:nth-child(16) { --x: 140px;  --y: 60px;   --r: -280deg; }
.confetti i:nth-child(17) { --x: -90px;  --y: 40px;   --r: 340deg; }
.confetti i:nth-child(18) { --x: 95px;   --y: -20px;  --r: -100deg; }
.confetti i:nth-child(19) { --x: -270px; --y: -20px;  --r: 160deg; }
.confetti i:nth-child(20) { --x: 280px;  --y: 70px;   --r: -220deg; }
.confetti i:nth-child(21) { --x: -150px; --y: 200px;  --r: 280deg; }
.confetti i:nth-child(22) { --x: 160px;  --y: 200px;  --r: -340deg; }
.confetti i:nth-child(23) { --x: 0;      --y: -150px; --r: 90deg; }
.confetti i:nth-child(24) { --x: 10px;   --y: 220px;  --r: -90deg; }

/* ---------- Ticket du rendez-vous ---------- */
.ticket { padding: 0; overflow: hidden; animation: rise .7s .2s var(--ease) backwards; }
.ticket-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    color: #fff;
    background: linear-gradient(120deg, var(--blue-dk), var(--blue) 60%, var(--blue-lt));
    position: relative;
}
.ticket-top::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    border-bottom: 2px dashed rgba(255, 255, 255, .5);
}
.ticket-date strong { display: block; font-size: 1.15rem; }
.ticket-date strong::first-letter { text-transform: uppercase; }
.ticket-time { font-size: 1.7rem; font-weight: 800; letter-spacing: .5px; }
.ticket-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 18px;
    margin: 0;
    padding: 20px 22px 8px;
    font-size: .95rem;
}
.ticket-dl dt { color: var(--muted); font-weight: 600; }
.ticket-dl dd { margin: 0; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 22px 22px; }
.ticket-actions form { margin: 0; }
.state-annule .ticket-top { background: linear-gradient(120deg, #6b7280, #9aa1ad); }
.state-passe .ticket-top { background: linear-gradient(120deg, #475569, #64748b); }

.badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .45);
}
.badge-confirme::before { content: "● "; color: #6ff2b8; }

.copy { display: flex; gap: 8px; margin-top: 10px; }
.copy input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    font-family: inherit;
    font-size: .82rem;
    color: var(--muted);
    background: #fff;
}

/* ---------- Moins d'animations si demandé dans le système ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
    body::before, body::after { animation: none; }
}

/* ---------- Convocation ---------- */
.pill-warn { background: rgba(234, 88, 12, .12); color: #b54708; margin-left: 4px; }
.field input[readonly] { background: #f3f5fa; color: var(--muted); }

/* ---------- Prendre rendez-vous : choix du fait, deux commissariats, carte ---------- */
.fait-choix { padding: 22px 26px; margin-bottom: 20px; animation: rise .6s .1s var(--ease) backwards; }
.fait-choix label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--blue); }
.fait-choix select {
    width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, .9); font: inherit; font-size: 1rem; color: var(--ink); cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.fait-choix select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(36, 75, 166, .12); }
.fait-texte { margin: 0 0 20px; padding: 18px 22px; }
.fait-texte-rdv { margin: 8px 0 0; font-size: .9em; }
.pill-center { display: table; margin: 0 auto 22px; }

.wrap:has(.fait-choix) { width: min(1440px, 100% - 64px); }   /* page « Prendre rendez-vous » : toute la largeur utile */
.sites { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-top: 8px; }
@media (max-width: 960px) { .sites { grid-template-columns: 1fr; gap: 20px; } .wrap:has(.fait-choix) { width: min(760px, 100% - 32px); } }
.site { padding: 26px 28px; min-width: 0; animation: rise .6s var(--ease) backwards; }
.site:nth-child(2) { animation-delay: .1s; }
.site-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.site-head .who-ico { width: 50px; height: 50px; font-size: 1.5rem; border-radius: 14px; flex: none; }
.site-nom { margin: 0 0 2px; font-size: 1.05rem; }
.btn-carte { margin-top: 6px; }
.site .days { margin: 0 -4px 4px; gap: 12px; }
.day-title { font-size: 1rem; margin: 14px 0 14px; }
.day-title::first-letter { text-transform: uppercase; }
.site .slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.site .slot { padding: 13px 0; font-size: 1rem; }

.modal {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center; padding: 16px;
    background: rgba(13, 23, 51, .55); backdrop-filter: blur(4px);
    animation: fadeIn .2s ease;
}
.modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box { width: min(760px, 100%); padding: 14px; background: #fff; animation: rise .3s var(--ease); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-x { border: 0; background: rgba(36, 75, 166, .08); color: var(--blue); width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.modal-x:hover { background: var(--blue); color: #fff; }
.modal-box iframe { width: 100%; height: min(60vh, 460px); border: 0; border-radius: 12px; display: block; margin-bottom: 8px; }

/* ---------- Courte relation des faits (zone de texte à étiquette flottante) ---------- */
.field textarea {
    width: 100%;
    padding: 24px 14px 10px;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, .9);
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--ink);
    resize: vertical;
    min-height: 110px;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(36, 75, 166, .12); }
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label { top: 7px; font-size: .72rem; font-weight: 700; color: var(--blue); }
.field.has-err textarea { border-color: var(--danger); background: #fff6f5; }
.field-help { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.ticket-dl dd.relation { white-space: normal; font-size: .9em; line-height: 1.45; }

/* ---------- Récapitulatif : le commissariat sous la date, aligné à gauche (adresses longues) ---------- */
.recap { flex-direction: column; align-items: stretch; gap: 12px; }
.recap-who { text-align: left; padding-top: 12px; border-top: 1px dashed var(--line); }
.recap-who small { margin-top: 2px; }

/* ---------- Choix du fait : champ de recherche avec suggestions ---------- */
.fait-choix { position: relative; z-index: 5; }
.combo { position: relative; }
.combo input {
    width: 100%; padding: 14px 44px 14px 46px; border-radius: 14px; border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23244BA6' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 16px center;
    font: inherit; font-size: 1rem; color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.combo input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px rgba(36, 75, 166, .12); }
.combo-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(36, 75, 166, .08); color: var(--blue); font-size: .85rem;
}
.combo-clear:hover { background: var(--blue); color: #fff; }
.combo-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    max-height: 340px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
    background: #fff; border-radius: 14px; border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(20, 40, 110, .18);
    animation: rise .18s var(--ease);
}
.combo-opt {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 10px; cursor: pointer; color: var(--ink);
}
.combo-opt small { flex: none; color: var(--blue); font-weight: 700; font-size: .8rem; background: rgba(36, 75, 166, .08); padding: 3px 9px; border-radius: 999px; }
.combo-opt.actif { background: rgba(36, 75, 166, .08); }
.combo-opt mark { background: rgba(63, 182, 255, .3); color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-sep { padding: 10px 14px 4px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.combo-vide { padding: 14px; color: var(--muted); text-align: center; }

/* ---------- Textes enrichis des faits ---------- */
.texte-riche { line-height: 1.5; }
.texte-riche p { margin: 0 0 6px; }
.texte-riche ul, .texte-riche ol { margin: 6px 0; padding-left: 22px; }
.texte-riche li { margin: 2px 0; }

/* ---------- Image d'un fait (sous le texte), agrandissable ---------- */
.fait-image { margin: 12px 0 0; }
.fait-image img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; border-radius: 12px; cursor: zoom-in; box-shadow: 0 4px 14px rgba(20, 40, 110, .12); transition: transform .2s var(--ease); }
.fait-image img:hover { transform: scale(1.01); }
.fait-image figcaption { margin-top: 6px; font-size: .82rem; color: var(--muted); }
.zoom { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(13, 23, 51, .8); animation: fadeIn .2s ease; cursor: zoom-out; }
.zoom[hidden] { display: none; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.zoom .modal-x { position: absolute; top: 16px; right: 16px; background: #fff; }

/* ---------- Accueil : Police-on-web (en haut) et bandeau urgences (en bas) ---------- */
.pow { display: flex; align-items: center; gap: 22px; padding: 20px 24px; margin-bottom: 26px; animation: rise .6s var(--ease) backwards; }
.pow-logo { flex: none; transition: transform .2s var(--ease); }
.pow-logo:hover { transform: scale(1.04); }
.pow-logo img { display: block; width: 200px; height: auto; }
.pow-texte h2 { margin: 0 0 6px; font-size: 1.1rem; color: var(--blue); }
.pow-texte p { margin: 0; font-size: .93rem; line-height: 1.5; color: var(--ink); }
.pow-texte a { color: var(--blue); font-weight: 700; }
@media (max-width: 640px) { .pow { flex-direction: column; align-items: flex-start; } }

/* ---------- Conditions d'utilisation (sous le bouton de confirmation) ---------- */
.cgu { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .8rem; line-height: 1.5; color: var(--muted); }
.cgu strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: .85rem; }
.cgu p { margin: 0 0 6px; }
.cgu a { color: var(--blue); font-weight: 600; word-break: break-all; }

/* ---------- Accueil : urgences 112 / 101 (cartes arrondies, boutons d'appel) ---------- */
.urgences { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 26px; }
.urgence-carte {
    --rouge: #c8294e;
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 14px;
    padding: 12px 12px 12px 16px; border-radius: 18px;
    background: linear-gradient(135deg, #d6335a, #b0213f);
    color: #fff;
    box-shadow: 0 10px 26px rgba(176, 33, 63, .28);
    animation: rise .6s .3s var(--ease) backwards;
    transition: transform .25s var(--ease), box-shadow .25s;
}
.urgence-carte:nth-child(2) { animation-delay: .4s; }
.urgence-carte::after {
    content: ""; position: absolute; width: 160px; height: 160px; right: -50px; top: -70px;
    border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none;
}
.urgence-carte:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(176, 33, 63, .36); }
.urgence-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.urgence-ico svg { width: 22px; height: 22px; }
.urgence-q { flex: 1; min-width: 0; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.urgence-btn {
    flex: none; position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 16px; border-radius: 12px;
    background: #fff; color: var(--rouge, #c8294e);
    font-weight: 700; font-size: .88rem; text-decoration: none; text-transform: uppercase; letter-spacing: .2px; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: transform .2s var(--ease), box-shadow .2s;
}
.urgence-btn strong { font-size: 1.15rem; letter-spacing: .5px; }
.urgence-btn:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.urgence-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.urgence-tel { width: 18px; height: 18px; display: grid; place-items: center; position: relative; }
.urgence-tel svg { width: 18px; height: 18px; }
.urgence-tel::before {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid currentColor; opacity: 0; animation: telPulse 2.4s ease-out infinite;
}
@keyframes telPulse { 0% { transform: scale(.6); opacity: .6; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@media (max-width: 420px) { .urgence-carte { flex-wrap: wrap; } .urgence-btn { width: 100%; justify-content: center; } }

/* Annulation en ligne plus possible (moins de X heures avant) */
.annul-tard { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: .9rem; border: 1px solid #fed7aa; }

/* Pour changer de date : annuler puis reprendre un rendez-vous */
.replanifier { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(36, 75, 166, .06); color: var(--ink); font-size: .9rem; border: 1px solid rgba(36, 75, 166, .15); }

/* ---------- Convocation : langue de l'audition ---------- */
.langue-audition { border: 0; padding: 0; margin: 4px 0 14px; }
.langue-audition legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; color: var(--ink); }
.langue-choix { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.radio { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: .95rem; }
.radio input { width: 18px; height: 18px; accent-color: var(--blue); }
.langue-choix input[type="text"] {
    flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line);
    font: inherit; font-size: .95rem; background: rgba(255, 255, 255, .95);
}
.langue-choix input[type="text"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 75, 166, .12); }
.langue-choix input[hidden] { display: none; }
.langue-audition.has-err legend { color: var(--danger); }

/* ---------- Insigne de grade : mini-épaulette ---------- */
.insigne {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    min-width: 38px; height: 24px; padding: 2px 7px; box-sizing: border-box; vertical-align: middle;
    background: linear-gradient(135deg, #1f2747, #141a33); border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    position: relative; top: -2px;
}
.ins-sym { color: #e6eaf2; font-size: 14px; line-height: 1; letter-spacing: 3px; margin-right: -3px; font-weight: 400; text-shadow: 0 0 1px rgba(255, 255, 255, .35); }
.ins-barre { width: 80%; height: 2px; background: #e6eaf2; border-radius: 1px; }
.h1 .insigne { height: 30px; min-width: 46px; top: 0; vertical-align: .12em; margin-right: 4px; }
.h1 .ins-sym { font-size: 17px; }

/* Épaulette dorée (commissaires : couronne ♔) */
.insigne-or .ins-sym { color: #f2c94c; text-shadow: 0 0 2px rgba(242, 201, 76, .45); }
.insigne-or .ins-barre { background: #f2c94c; }

/* Logo de la zone (complet) dans une pastille blanche, en haut à gauche du bandeau */
.brand img.logo-zone {
    width: auto; height: 64px; border-radius: 10px; background: #fff; padding: 6px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15); animation: none;
}
@media (max-width: 560px) {
    .brand img.logo-zone { height: 48px; padding: 4px 7px; }
    .brand small { display: none; }
}
