/* ── Reset & base ───────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bleu: #2c3e8c;
    --bleu-clair: #4a5fa8;
    --jaune: #f0a500;
    --vert: #27ae60;
    --rouge: #e74c3c;
    --gris-clair: #f4f6f9;
    --gris-bord: #dde3ec;
    --texte: #1e293b;
    --texte-doux: #64748b;
    --blanc: #ffffff;
    --violet: #e65eaf;
    --rayon: 10px;
    --ombre: 0 2px 8px rgba(0, 0, 0, .08);
    --font: 'Segoe UI', system-ui, Arial, sans-serif;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--texte);
    background: var(--gris-clair);
    min-height: 100vh;
}

/* ── Conteneur ──────────────────────────────────────────────────── */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Navigation ─────────────────────────────────────────────────── */
.navbar {
    background: var(--bleu);
    padding: .85rem 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    color: var(--blanc);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .03em;
}

.navbar-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-etab {
    color: rgba(255, 255, 255, .85);
    font-size: .9rem;
}

/* ── Changer mot de passe ─────────────────────────────────────────────────────── */
/* dans le dashboard*/
.changer-mdp {
    text-align:center;
    margin-top:2rem;
    padding-top:1rem;
    border-top:1px solid var(--gris-bord)
}
.text-changer {
    font-size:.82rem;
    color:var(--texte-doux)
}

/* dans changer-mdp.php */
.bloc-changer {
    max-width:480px;
    margin:0 auto
}

.titre-changer {
    color:var(--bleu);
    margin-bottom:1.5rem
}

.titre-retour {
    color:var(--texte-doux);
    text-decoration:none
}


/* ── Cartes ─────────────────────────────────────────────────────── */
.card {
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.card-titre {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bleu);
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--gris-bord);
}

/* ── Boutons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem 1.4rem;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: filter .15s, transform .1s;
    text-align: center;
}

.btn:hover {
    filter: brightness(.92);
}

.btn:active {
    transform: scale(.98);
}

.btn-primaire {
    background: var(--bleu);
    color: var(--blanc);
}

.btn-precedent {
    color: var(--blanc);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    padding: .6rem 1.2rem;
    font-size: .9rem;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.btn-precedent:hover {
    border-color: var(--blanc);
    background: rgba(255, 255, 255, 0.1);
}

/* ── Lien terminer entretien ─────────────────────────────────── */
.lien-terminer {
    font-size: .8rem;
    color: rgba(38, 45, 148, 0.5);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.lien-terminer:hover {
    color: rgba(162, 26, 26, 0.8);
}

.btn-jaune {
    background: var(--jaune);
    color: var(--blanc);
}

.btn-vert {
    background: var(--vert);
    color: var(--blanc);
}

.btn-rouge {
    background: var(--rouge);
    color: var(--blanc);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--blanc);
    color: var(--blanc);
    padding: .4rem 1rem;
}

.btn-xs {
    padding: .28rem .65rem;
    font-size: .78rem;
    min-height: 30px;
}

.btn-sm {
    padding: .35rem .9rem;
    font-size: .85rem;
}

.btn-lg {
    padding: .85rem 2rem;
    font-size: 1.05rem;
}

.btn-bloc {
    display: block;
    width: 100%;
}

.btn-prec-suiv {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:1.75rem
}
/* ── Formulaires ────────────────────────────────────────────────── */
.form-groupe {
    margin-bottom: 1.25rem;
}

.form-groupe label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
}

.form-control {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--gris-bord);
    border-radius: var(--rayon);
    font-size: 1rem;
    font-family: var(--font);
    background: var(--blanc);
    color: var(--texte);
    transition: border-color .15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--bleu-clair);
    box-shadow: 0 0 0 3px rgba(74, 95, 168, .15);
}

/* ── Labels radio/checkbox formulaires ──────────────────────── */
.label-radio {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

/* ── Alertes ────────────────────────────────────────────────────── */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--rayon);
    margin-bottom: 1rem;
    font-size: .9rem;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--vert);
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-color: var(--rouge);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--jaune);
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--bleu);
    color: #1e40af;
}


/* ── Page inscription ───────────────────────────────────────── */
.inscription-box {
    background: var(--blanc);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}

.inscription-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.inscription-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--bleu);
}

.inscription-logo p {
    font-size: .85rem;
    color: var(--texte-doux);
    margin-top: .25rem;
}

/* Autocomplétion */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-liste {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blanc);
    border: 1.5px solid var(--bleu-clair);
    border-top: none;
    border-radius: 0 0 var(--rayon) var(--rayon);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-item {
    padding: .65rem .9rem;
    cursor: pointer;
    font-size: .9rem;
    border-bottom: 1px solid var(--gris-bord);
}

.autocomplete-item:hover,
.autocomplete-item.actif {
    background: #eff6ff;
    color: var(--bleu);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item small {
    display: block;
    color: var(--texte-doux);
    font-size: .78rem;
}

.etab-selectionne {
    background: #eff6ff;
    border: 1.5px solid var(--bleu-clair);
    border-radius: var(--rayon);
    padding: .6rem .9rem;
    font-size: .9rem;
    color: var(--bleu);
    margin-top: .4rem;
    display: none;
}

.etab-selectionne strong {
    display: block;
}

.etab-selectionne a {
    font-size: .8rem;
    color: var(--texte-doux);
    cursor: pointer;
}

.bloc-cache {
    display: none;
}

.type-etab-options {
    display: flex;
    margin-top: .4rem;
    flex-wrap: wrap;
}

.type-etab-options label {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.champ-obligatoire {
    color: var(--rouge);
}

.contactez {
    font-size: .78rem;
    color: var(--texte-doux);
    margin-top: .4rem
}

/* ── page login ────────────────────────────────────────── */
/* Logos */
.login-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.login-logos img {
    height: 90px;
    width: auto;
}

.login-box {
    background: var(--blanc);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}

.login-titre {
    text-align: center;
    margin-bottom: 2rem;
}

.login-titre h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bleu);
    letter-spacing: .04em;
}

.login-titre p {
    font-size: .85rem;
    color: var(--texte-doux);
    margin-top: .25rem;
}

/* ── QCM — options style image de référence ─────────────────────── */
.qcm-carte {
    background: var(--bleu);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    color: var(--blanc);
}

.qcm-compteur {
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    background: var(--blanc);
    color: var(--bleu);
    border-radius: 50px;
    padding: .3rem 1.2rem;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.qcm-question-texte {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.75rem;
    line-height: 1.45;
}

.qcm-options {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.qcm-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--blanc);
    border-radius: 50px;
    padding: .85rem 1.25rem;
    cursor: pointer;
    border: 4px solid transparent;
    transition: border-color .15s, background .15s;
    color: var(--texte);
    font-size: .95rem;
}

.qcm-option:hover {
    border-color: var(--jaune);
    border-width: 4px;
}

.qcm-option.selectionnee {
    border-color: var(--jaune);
    border-width: 4px;
    background: var(--gris-bord);
}

.qcm-option input[type=radio] {
    display: none;
}

.sous-question {
    display: none;
    margin-top: 1.25rem;
    background: rgba(255, 255, 255, .15);
    border-radius: 12px;
    padding: 1rem
}
.qcm-lettre {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bleu);
    color: var(--blanc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.qcm-option.selectionnee .qcm-lettre {
    background: var(--bleu-clair);
    border-color: var(--jaune) ;
}

/* ── Argumentaire (après certaines réponses) ────────────────────── */
.argumentaire-carte {
    background: var(--blanc);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--ombre);
    max-width: 520px;
    margin: 2rem auto;
}

.argumentaire-icone {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bleu);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.argumentaire-icone svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--blanc);
    /* couleur du trait */
    /* stroke-width: 2;  épaisseur du trait*/
    stroke-linecap: round;
    /* extrémités arrondies */
    stroke-linejoin: round;
    /* jonctions arrondies */
}

.argumentaire-texte {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--texte);
    margin-bottom: 1.75rem;
}

/* ── Barre de progression campagne ──────────────────────────────── */
.progression-barre {
    height: 8px;
    background: var(--gris-bord);
    border-radius: 99px;
    margin: .5rem 0 .25rem;
}

.progression-remplir {
    height: 100%;
    background: var(--vert);
    border-radius: 99px;
    transition: width .4s ease;
}

.progression-label {
    font-size: .8rem;
    color: var(--texte-doux);
}

.periode {
    margin-top:.75rem;
    font-size:.85rem;
    color:var(--texte-doux)
}

/* ── Barre de progression questionnaire ──────────────────────────────── */
.progression-questionnaire {
    margin: -1rem -1.25rem 1.5rem;
    background: var(--gris-bord);
    height: 6px
}

.retour-dashboard {
    color: var(--texte-doux);
    text-decoration: none;
    font-size: .875rem
}

/* ── Tableau ────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: .7rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--gris-bord);
}

th {
    font-size: .82rem;
    font-weight: 700;
    color: var(--texte-doux);
    background: var(--gris-clair);
}

tr:hover td {
    background: #f8fafc;
}

/* ── Utilitaires ─────────────────────────────────────────────────── */
.mt-1 {
    margin-top: .5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: .5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

.text-doux {
    color: var(--texte-doux);
    font-size: .875rem;
}

.text-vert {
    color: var(--vert);
    font-weight: 700;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: .5rem;
}

.gap-2 {
    gap: 1rem;
}

.justify-between {
    justify-content: space-between;
}

.w-100 {
    width: 100%;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    color: var(--texte-doux);
    font-size: .85rem;
    border-top: 1px solid var(--gris-bord);
}

/* ── Dashboard : boutons campagne ───────────────────────────── */
.campagne-boutons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.campagne-boutons form {
    display: inline-flex;
    /* Formulaire inline dans les boutons campagne  */
    margin: 0;
}

.campagne-boutons button {
    font-family: inherit;
    /*les <button> n'héritent pas automatiquement de la police contrairement aux <a>*/
    cursor: pointer;
}

/* ── Badges type établissement ──────────────────────────────── */
.badge-type {
    padding: 2px 10px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    display: inline-block;
}

.badge-es {
    background: #dbeafe;
    color: #1e40af;
}

.badge-ems {
    background: #fef3c7;
    color: #92400e;
}

/* ── Badge statut campagne ───────────────────────────────────── */
.badge-statut {
    margin-left: .75rem;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    display: inline-block;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-cloturee {
    background: #f1f5f9;
    color: #64748b;
}

/* ── Résultats ───────────────────────────── */
.grille-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-bar {
    position: relative;
    height: 80px;
}

/* Mobile */
@media (max-width: 600px) {
    .chart-bar {
        height: 110px;
    }
}

/* ── Responsive résultats ───────────────────────────────────── */
@media (max-width: 600px) {

    .campagne-boutons {
        gap: .4rem;
    }

    .campagne-boutons .btn {
        font-size: .74rem;
        padding: .25rem .5rem;
        min-height: 28px;
    }

    /* Grille sexe/statut : une colonne au lieu de deux */
    .grille-demo {
        grid-template-columns: 1fr !important;
    }

    /* Légendes des camemberts : taille réduite */
    .chart-legende {
        font-size: .7rem !important;
    }

    /* Barres empilées plus épaisse */
    .chart-bar {
        height: 110px;
    }
}

/* ── Résultats ───────────────────── */
.resultats-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.titre-bleu {
    color: var(--bleu);
}

.lien-retour {
    color: var(--texte-doux);
    text-decoration: none;
}

.lien-retour:hover {
    text-decoration: underline;
}

.resultats-sous-titre {
    font-weight: 600;
    margin-bottom: .5rem;
    font-size: .9rem;
}

.resultats-sous-titre-espace {
    margin-bottom: .75rem;
}

.chart-pie {
    position: relative;
    height: 200px;
}

.chart-pie-small {
    height: 220px;
    max-width: 320px;
    margin: 0 auto;
}

.chart-specialite {
    position: relative;
    height: 260px;
}

.chart-sub {
    position: relative;
    height: 240px;
}

.chart-horizontal-large {
    height: 460px;
}

.bloc-separe {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gris-bord);
}

.bloc-sous-resultats {
    margin-top: 1.25rem;
}

.age-stats {
    display: flex;
    gap: 2rem;
}

.age-moyen {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu);
}

.age-min-max {
    font-size: .875rem;
    align-self: flex-end;
}

.question-resultat-entete {
    margin-bottom: 1rem;
}

.question-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--bleu);
    background: #eff6ff;
    padding: 2px 10px;
    border-radius: 50px;
}

.question-resultat-texte {
    margin-top: .5rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-xs {
    font-size: .8rem;
}

.sous-resultat-titre {
    font-size: .85rem;
    font-weight: 600;
    color: var(--texte-doux);
    margin-bottom: .5rem;
}

/* ── Commentaires texte libre ───────────────────────────────── */
.commentaires-bloc {
    background: #f8fafc;
    border-left: 3px solid var(--bleu-clair);
    border-radius: 0 var(--rayon) var(--rayon) 0;
    padding: .75rem 1rem;
    margin-top: 1rem;
}

.commentaires-titre {
    font-size: .85rem;
    font-weight: 600;
    color: var(--bleu);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.icone-parole {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--bleu);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.commentaire-item {
    font-style: italic;
    font-size: .875rem;
    color: var(--texte-doux);
    padding: .3rem 0;
    border-bottom: 1px solid var(--gris-bord);
}

.commentaire-item:last-child {
    border-bottom: none;
}

/* ── Argumentaire sous graphique résultats ──────────────────── */
.argumentaire-resultat {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid var(--bleu);
    border-left: 4px solid var(--bleu);
    border-radius: var(--rayon);
    padding: .85rem 1rem;
    margin-top: 1rem;
    font-size: .875rem;
    color: var(--texte);
    line-height: 1.5;
}

.argumentaire-resultat-icone {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--bleu);
}

.argumentaire-resultat-icone svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--bleu);
    stroke-width: 2;
    stroke-linecap: round;
}

@media (max-width: 600px) {
    .resultats-entete {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-pie {
        height: 220px;
    }

    .chart-pie-small {
        height: 230px;
        max-width: 100%;
    }

    .chart-specialite {
        height: 300px;
    }

    .chart-sub {
        height: 280px;
    }

    .chart-horizontal-large {
        height: 560px;
    }

    .age-stats {
        flex-direction: column;
        gap: .5rem;
    }

    .age-min-max {
        align-self: flex-start;
    }
}