@font-face {
    font-family: 'Luciole';
    src: url('https://cdn.jsdelivr.net/gh/nicowillis/luciole@main/Luciole-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal;
}
@font-face {
    font-family: 'Luciole';
    src: url('https://cdn.jsdelivr.net/gh/nicowillis/luciole@main/Luciole-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal;
}

:root {
    --teal:    #203C47;
    --teal-mid:#445863;
    --orange:  #D14600;
    --grey:    #475467;
    --cream:   #FAF8FC;
    --white:   #FFFFFF;
    --green:   #1A6B4B;
    --red:     #C0392B;
    --border:  #C8D3DB;
    --shadow:  0 2px 12px rgba(32,60,71,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Luciole', Arial, sans-serif;
    background: var(--cream);
    color: var(--grey);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Bandeau IA ─────────────────────────────────────────────── */
.ia-banner {
    background: var(--orange);
    color: var(--white);
    text-align: center;
    padding: .45rem 1rem;
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .82rem;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
    background: var(--teal);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border-bottom: 3px solid var(--orange);
}

.logo-img {
    height: 44px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.header-info { flex: 1; }

.header-info h1 {
    font-family: 'Nunito', Verdana, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: .15rem;
}

.header-info p {
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .78rem;
    color: rgba(255,255,255,.65);
}

.user-badge {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    padding: .35rem .85rem;
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .78rem;
    color: var(--white);
}

/* ── Layout ─────────────────────────────────────────────────── */
main {
    flex: 1;
    max-width: 820px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* ── Titres de section ──────────────────────────────────────── */
.section-title {
    font-family: 'Nunito', Verdana, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 1.2rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--orange);
}

/* ── Carte ──────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* ── Champs ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.4rem; }

label {
    display: block;
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .875rem;
    font-weight: bold;
    color: var(--teal);
    margin-bottom: .4rem;
}

label .required { color: var(--orange); margin-left: .2em; }
label .hint { font-weight: normal; color: var(--grey); font-size: .8rem; margin-left: .4em; }

input[type="text"],
select,
textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .9rem;
    color: var(--grey);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(32,60,71,.12);
}

textarea { resize: vertical; min-height: 100px; }

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475467' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 580px) { .form-row { grid-template-columns: 1fr; } }

/* ── Verdict cards ──────────────────────────────────────────── */
.verdict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .6rem;
    margin-top: .4rem;
}

.verdict-card { position: relative; }

.verdict-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.verdict-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .8rem .5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: normal;
    font-size: .8rem;
    text-align: center;
    color: var(--grey);
    background: var(--white);
    transition: border-color .2s, background .2s;
    user-select: none;
}

.verdict-card label .emoji { font-size: 1.4rem; line-height: 1; }

.verdict-card input[type="radio"]:checked + label {
    border-color: var(--teal);
    background: rgba(32,60,71,.06);
    color: var(--teal);
    font-weight: bold;
}

/* Hover : fond blanc (contraste OK) au lieu de cream */
.verdict-card label:hover {
    border-color: var(--teal-mid);
    background: var(--white);
}

/* Focus clavier visible */
.verdict-card input[type="radio"]:focus-visible + label {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

/* ── Bouton ─────────────────────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: .9rem 1.5rem;
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Nunito', Verdana, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: .5rem;
}

.btn-submit:hover { background: var(--teal-mid); }
.btn-submit:active { transform: scale(.99); }
.btn-submit:disabled { background: var(--border); cursor: not-allowed; }

/* ── Alertes ────────────────────────────────────────────────── */
.alert {
    padding: 1rem 1.2rem;
    border-radius: 8px;
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .9rem;
    margin-bottom: 1.2rem;
    display: none;
}

.alert.success {
    background: rgba(26,107,75,.08);
    border: 1.5px solid var(--green);
    color: var(--green);
}

.alert.error {
    background: rgba(192,57,43,.08);
    border: 1.5px solid var(--red);
    color: var(--red);
}

/* ── Séparateur ─────────────────────────────────────────────── */
.separator { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ── Ressenti ───────────────────────────────────────────────── */
.ressenti-card {
    background: rgba(32,60,71,.04);
    border: 1.5px solid var(--border);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
}

.ressenti-card .q-num {
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .75rem;
    font-weight: bold;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .3rem;
}

.ressenti-card label {
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .875rem;
    color: var(--teal);
    margin-bottom: .5rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    background: var(--teal);
    color: rgba(255,255,255,.6);
    text-align: center;
    padding: .55rem 1rem;
    font-family: 'Luciole', Arial, sans-serif;
    font-size: .75rem;
}

footer strong { color: var(--white); }

/* ── Focus visible ──────────────────────────────────────────── */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }