:root {
    --bleu: #0A7EC2;
    --cyan: #4CBFCF;
    --vert: #2E8B57;
    --texte: #1a1a1a;
    --fond: #f4f7f9;
    --bordure: #d5dde2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--fond);
    color: var(--texte);
    font-size: 18px;
}

.topbar {
    background: var(--bleu);
    color: #fff;
    padding: 1rem 1.5rem;
}
.topbar-title { font-weight: 600; }

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
}

h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.subtitle { color: #555; margin-top: 0; }

fieldset {
    border: 1px solid var(--bordure);
    border-radius: 8px;
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1.25rem;
    background: #fff;
}
legend { font-weight: 600; color: var(--bleu); padding: 0 0.4rem; }

label { display: block; margin-top: 0.75rem; margin-bottom: 0.25rem; font-weight: 500; }

input[type="text"], input[type="tel"], input[type="date"], input[type="password"], select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--bordure);
    border-radius: 6px;
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.9rem 0;
    font-weight: normal;
}
.checkbox-line input[type="checkbox"] {
    width: 1.4rem;
    height: 1.4rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

p.info, ul.info { color: #444; font-size: 0.95rem; }
.facultatif { font-weight: normal; color: #666; font-size: 0.9rem; }
.details-autorisation { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.details-autorisation li { margin: 0.25rem 0; }

#signature-pad {
    width: 100%;
    max-width: 600px;
    height: 200px;
    border: 2px dashed var(--bordure);
    border-radius: 6px;
    background: #fff;
    touch-action: none;
    display: block;
    margin: 0.5rem 0;
}

.btn-principal, .btn-secondaire {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    font-size: 1.05rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-principal { background: var(--bleu); color: #fff; }
.btn-secondaire { background: #e5eaed; color: var(--texte); }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

button[type="submit"].btn-principal { width: 100%; margin-top: 0.5rem; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

.flashes { margin-bottom: 1rem; }
.flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 0.5rem; }
.flash-success { background: #e3f5e9; color: var(--vert); }
.flash-danger { background: #fbe4e4; color: #a4302f; }
.flash-warning { background: #fff4d9; color: #8a6400; }

.login-box { max-width: 380px; margin: 3rem auto; background: #fff; padding: 1.5rem; border-radius: 8px; border: 1px solid var(--bordure); }

.table-demandes, .table-detail { width: 100%; border-collapse: collapse; background: #fff; }
.table-demandes th, .table-demandes td,
.table-detail th, .table-detail td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--bordure); text-align: left; }
.table-detail th { width: 40%; color: #555; }

.confirmation { text-align: center; background: #fff; padding: 2rem; border-radius: 8px; }

.signature-img { max-width: 100%; border: 1px solid var(--bordure); background: #fff; }

@media print {
    .topbar, .no-print { display: none !important; }
    body { font-size: 14px; }
}

/* Double authentification coordinatrice */
.aide-2fa { font-size: 0.9rem; color: #555; }
.qr-2fa { display: block; margin: 1rem auto; max-width: 220px; width: 100%; height: auto; }
.secret-2fa { font-family: monospace; font-size: 0.95rem; word-break: break-all; text-align: center; }
input.code-2fa { font-size: 1.5rem; letter-spacing: 0.3em; text-align: center; }

/* Parcours professionnel : identification, anti-robot, cercle de soins */
.champ-piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.captcha-etat { font-size: 0.85rem; color: #666; text-align: center; margin: 0.5rem 0 0; }
.captcha-etat.ok { color: var(--vert); }
.captcha-etat.erreur { color: #a4302f; }
button[disabled] { opacity: 0.6; cursor: wait; }
.pro-identifie { background: #fff; border: 1px solid var(--bordure); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; font-size: 0.95rem; }
.pro-identifie a { font-size: 0.9rem; }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.8rem; margin-left: 0.3rem; }
.badge-ok { background: #e3f5e9; color: var(--vert); }
.badge-attention { background: #fff4d9; color: #8a6400; }
.membre-cercle { border-top: 1px solid var(--bordure); padding: 0.6rem 0; }
.membre-cercle summary { font-weight: 600; cursor: pointer; padding: 0.3rem 0; }

/* Écran d'accueil */
.bandeau-test { background: #fff4d9; color: #8a6400; border: 1px solid #f0d58a; border-radius: 8px; padding: 0.7rem 1rem; margin-bottom: 1rem; font-size: 0.95rem; }
.hero {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--cyan) 100%);
    color: #fff; border-radius: 16px; padding: 2rem 1.5rem 1.75rem; text-align: center;
    box-shadow: 0 8px 24px rgba(10, 126, 194, 0.25);
}
.hero-icone { width: 72px; height: 72px; margin-bottom: 0.5rem; }
.hero-surtitre { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; opacity: 0.9; margin: 0; }
.hero h1 { font-size: 2rem; margin: 0.2rem 0 0.6rem; }
.hero-texte { font-size: 1.05rem; line-height: 1.5; margin: 0 auto; max-width: 34rem; }
.cartes { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin: 1.25rem 0; }
.carte {
    background: #fff; border: 1px solid var(--bordure); border-radius: 12px; padding: 1rem 1.1rem;
    display: grid; grid-template-columns: 34px 1fr; column-gap: 0.9rem; align-items: start;
}
.carte .carte-icone { grid-row: span 2; }
.carte h2 { font-size: 1.05rem; color: var(--bleu); margin: 0.2rem 0 0.3rem; }
@media (min-width: 760px) {
    .cartes { grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
    .carte { display: block; padding: 1.1rem 1.1rem 0.9rem; }
    .carte h2 { margin: 0.4rem 0; }
}
.carte p { font-size: 0.92rem; line-height: 1.45; color: #444; margin: 0; }
.carte-icone { width: 34px; height: 34px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carte-icone .plein { fill: var(--cyan); }
.etapes-apercu { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.etapes-apercu li { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; font-size: 0.98rem; }
.etapes-apercu span { flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--bleu); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.etapes-apercu em { color: #666; font-style: normal; font-size: 0.9rem; }
.engagement { background: #fff; border: 2px solid var(--cyan); border-radius: 12px; padding: 1rem 1.25rem 1.25rem; }
.engagement .checkbox-line { margin-top: 0.25rem; }
.btn-large { display: block; width: 100%; font-size: 1.15rem; padding: 1rem; margin-top: 0.75rem; }
.lien-discret { text-align: center; font-size: 0.9rem; margin-bottom: 0; }

/* Fil d'étapes */
.fil-etapes { display: flex; list-style: none; padding: 0; margin: 0 0 1rem; gap: 0.4rem; font-size: 0.85rem; }
.fil-etapes li { flex: 1; text-align: center; padding: 0.45rem 0.3rem; border-radius: 999px; background: #e5eaed; color: #666; }
.fil-etapes li.fait { background: #dff2f5; color: var(--bleu); }
.fil-etapes li.actif { background: var(--bleu); color: #fff; font-weight: 600; }
.fil-etapes a { color: inherit; text-decoration: none; }
