/* Kiosque Congrès RQRA — Télipso. Pages autonomes (sans le thème). */
:root {
    --navy: #0d475f;   /* charte : marine */
    --navy-deep: #08303f;
    --turq: #66c8ee;   /* charte : bleu ciel */
    --teal: #1a7aa3;   /* bleu ciel assombri : lisible sur blanc */
    --rqra: #0072bc;
    --ink: #13212c;
    --muted: #5b6b78;
    --line: #d5dee5;
    --bg: #eef3f6;
    --danger: #b42318;
    --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.rqra {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}
button, input { font: inherit; }

/* ---------- Logos ---------- */
.rqra-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 4vw, 28px);
}
.rqra-logo { display: block; height: auto; }
.rqra-logo--telipso { width: clamp(96px, 28vw, 150px); }
.rqra-logo--rqra { width: clamp(120px, 36vw, 200px); }
.rqra-logos__sep { width: 1px; align-self: stretch; background: var(--line); }

/* =====================================================================
   Formulaire de contact (mobile d'abord : ouvert depuis le code QR)
   ===================================================================== */
.rqra-contact {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: linear-gradient(180deg, var(--navy) 0, var(--navy) 140px, var(--bg) 140px);
}
.rqra-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(13, 71, 95, .18);
    padding: 24px 22px 26px;
}
.rqra-card .rqra-logos { padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.rqra-eyebrow {
    margin: 0 0 4px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--teal);
}
.rqra-card h1 { margin: 0 0 8px; font-size: 1.65rem; line-height: 1.2; color: var(--navy); }
.rqra-lead { margin: 0 0 22px; color: var(--muted); }

.rqra-form { display: grid; gap: 16px; }
.rqra-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .rqra-row { grid-template-columns: 1fr; } }

.rqra-field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.rqra-field input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    font-size: 16px; /* ≥16px : évite le zoom automatique d'iOS */
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.rqra-field input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(26, 122, 163, .2);
}
.rqra-field.has-error input { border-color: var(--danger); }
.rqra-error { margin: 6px 0 0; font-size: .85rem; color: var(--danger); }
.rqra-alert {
    margin: 0 0 16px;
    padding: 10px 14px;
    color: var(--danger);
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 10px;
}
.rqra-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rqra-btn {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--navy);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.rqra-btn:hover { background: var(--navy-deep); }
.rqra-btn:active { transform: scale(.98); }
.rqra-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.rqra-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rqra-btn__spin {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rqra-spin .8s linear infinite;
}
.rqra-btn.is-sending { cursor: progress; background: var(--navy-deep); }
.rqra-btn.is-sending .rqra-btn__spin { display: inline-block; }
@keyframes rqra-spin { to { transform: rotate(360deg); } }
.rqra-privacy { margin: 0; font-size: .8rem; color: var(--muted); text-align: center; }

.rqra-thanks { text-align: center; padding: 10px 0 4px; }
.rqra-thanks__check {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    color: var(--navy);
    background: var(--turq);
    border-radius: 50%;
}
.rqra-muted { color: var(--muted); }

.rqra-foot { margin-top: 18px; font-size: .8rem; color: var(--muted); text-align: center; }
.rqra-foot a { color: inherit; }

/* =====================================================================
   Bocal à questions (écran tactile)
   ===================================================================== */
body.rqra-bocal {
    overflow: hidden;
    color: #fff;
    background: radial-gradient(ellipse at 50% 35%, #145f7d 0%, var(--navy) 45%, var(--navy-deep) 100%);
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.bocal {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: clamp(16px, 3vh, 32px) clamp(16px, 4vw, 56px);
}
.bocal-top { display: flex; justify-content: center; }
.bocal-top .rqra-logos {
    padding: 10px 26px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}
.bocal-top .rqra-logo--telipso { width: clamp(80px, 9vw, 130px); }
.bocal-top .rqra-logo--rqra { width: clamp(110px, 12vw, 170px); }

.bocal-screen {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 0;
}
.bocal[data-state="accueil"] .bocal-accueil,
.bocal[data-state="question"] .bocal-question { display: flex; animation: bocal-fade .35s ease both; }

.bocal-accueil h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6.5vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.05;
}
.bocal-sub { margin: 14px 0 clamp(24px, 5vh, 48px); font-size: clamp(1rem, 2vw, 1.5rem); opacity: .85; }

/* Bocal illustré */
.bocal-jar {
    position: relative;
    width: clamp(120px, 16vw, 210px);
    aspect-ratio: 4 / 5;
    margin-bottom: clamp(16px, 3vh, 32px);
    border: 4px solid rgba(255, 255, 255, .75);
    border-top-width: 0;
    border-radius: 18px 18px 38px 38px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .18) 30%, rgba(255, 255, 255, .05) 60%);
    overflow: hidden;
}
.bocal-jar::before { /* couvercle */
    content: "";
    position: absolute;
    top: 0;
    left: -4px;
    right: -4px;
    height: 14%;
    background: var(--turq);
    border-radius: 8px;
}
.bocal-paper {
    position: absolute;
    width: 30%;
    height: 14%;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
    animation: bocal-shake 3.2s ease-in-out infinite;
}
.bocal-paper:nth-child(1) { left: 8%; bottom: 6%; transform: rotate(-14deg); }
.bocal-paper:nth-child(2) { left: 36%; bottom: 4%; transform: rotate(8deg); background: var(--turq); }
.bocal-paper:nth-child(3) { left: 62%; bottom: 7%; transform: rotate(-6deg); }
.bocal-paper:nth-child(4) { left: 18%; bottom: 20%; transform: rotate(22deg); background: #d6f0fb; }
.bocal-paper:nth-child(5) { left: 48%; bottom: 19%; transform: rotate(-20deg); }
.bocal-paper:nth-child(6) { left: 10%; bottom: 34%; transform: rotate(-4deg); background: var(--turq); }
.bocal-paper:nth-child(7) { left: 40%; bottom: 33%; transform: rotate(12deg); }
.bocal-paper:nth-child(8) { left: 64%; bottom: 30%; transform: rotate(30deg); background: #d6f0fb; }
.bocal-paper:nth-child(9) { left: 28%; bottom: 47%; transform: rotate(-26deg); }
.bocal-paper:nth-child(even) { animation-delay: -1.6s; }

/* Question */
.bocal-cat {
    margin: 0 0 clamp(14px, 3vh, 28px);
    padding: 8px 20px;
    font-size: clamp(.85rem, 1.5vw, 1.15rem);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--turq);
    border-radius: 999px;
}
.bocal-cat:empty { display: none; }
.bocal-text {
    max-width: 22ch;
    margin: 0;
    font-size: clamp(1.9rem, 4.6vw, 4.4rem);
    font-weight: 700;
    line-height: 1.15;
    text-wrap: balance;
}
.bocal-text.is-in { animation: bocal-pop .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.bocal-count { margin: clamp(14px, 3vh, 26px) 0 0; font-size: 1rem; opacity: .6; font-variant-numeric: tabular-nums; }
.bocal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: clamp(24px, 5vh, 52px);
}

.bocal-btn {
    min-height: 72px;
    padding: 0 40px;
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    font-weight: 700;
    color: var(--navy);
    background: var(--turq);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: transform .12s, filter .15s;
}
.bocal-btn:active { transform: scale(.96); filter: brightness(.95); }
.bocal-btn:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.bocal-btn--xl {
    min-height: clamp(90px, 13vh, 130px);
    min-width: clamp(240px, 30vw, 400px);
    font-size: clamp(1.8rem, 4vw, 3rem);
    animation: bocal-pulse 2.4s ease-in-out infinite;
}
.bocal-btn--ghost {
    color: #fff;
    background: transparent;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}

/* Écran question : la question reste centrée à l'écran. Le code QR occupe la colonne de
   droite et une colonne vide de même largeur l'équilibre à gauche ; les boutons sont centrés
   sur toute la largeur. (.bocal-q-main en display: contents → ses enfants sont les cellules.) */
.bocal { --qr-w: clamp(150px, 17vw, 250px); }
.bocal[data-state="question"] .bocal-question {
    display: grid;
    grid-template-columns: var(--qr-w) minmax(0, 1fr) var(--qr-w);
    align-content: center;
    justify-items: center;
    column-gap: clamp(20px, 3vw, 48px);
}
.bocal-q-main { display: contents; }
.bocal-question .bocal-cat,
.bocal-question .bocal-text,
.bocal-question .bocal-count { grid-column: 2; }
.bocal-question .bocal-actions { grid-column: 1 / -1; }
.bocal-qr {
    grid-column: 3;
    grid-row: 1 / span 3;
    align-self: center;
    width: var(--qr-w);
    padding: 12px 12px 14px;
    color: var(--navy);
    text-align: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .3);
}
.bocal-qr canvas { display: block; width: 100%; height: auto; }
.bocal-qr__titre { margin: 8px 0 2px; font-size: clamp(.95rem, 1.4vw, 1.25rem); font-weight: 800; line-height: 1.2; }
.bocal-qr__sous { margin: 0; font-size: clamp(.72rem, .95vw, .9rem); line-height: 1.3; color: var(--muted); }

/* Portrait (tablette à la verticale) : tout en colonne, le code passe sous les boutons */
@media (max-aspect-ratio: 1/1) {
    .bocal[data-state="question"] .bocal-question { display: flex; flex-direction: column; }
    .bocal-qr { --qr-w: clamp(150px, 28vw, 230px); margin-top: clamp(16px, 3vh, 32px); }
}

/* Bouton plein écran : discret, disparaît une fois en plein écran */
.bocal-fs {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.bocal-fs[hidden] { display: none; }

@keyframes bocal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bocal-pop { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bocal-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes bocal-shake { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .rqra-btn__spin { animation: rqra-spin 1.6s linear infinite !important; }
}
@media (max-height: 560px) {
    .bocal-jar { display: none; }
    .bocal { --qr-w: 140px; }
}
