/* ============================================================================
   ADOMALI - PLATEFORME PRESCRIPTEURS
   assets/css/style.css
   Feuille de style unique, mobile-first.
   Palette reprise du site adomali.fr : violet #64008d, orange #E67E22.
   ============================================================================ */

/* ---------------------------------------------------------------- 1. RESET */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--texte);
    background: var(--fond);
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ 2. VARIABLES */
:root {
    /* Couleurs de marque (identiques a adomali.fr) */
    --violet:          #64008d;
    --violet-clair:    #f0e6f7;
    --violet-fonce:    #470063;
    --orange:          #E67E22;
    --vert:            #2ECC71;
    --rouge:           #E74C3C;
    --bleu:            #3498DB;

    /* Neutres */
    --texte:           #2c3e50;
    --texte-doux:      #7f8c8d;
    --bordure:         #e4e7eb;
    --fond:            #f6f7f9;
    --blanc:           #ffffff;

    /* Niveaux (gamification) */
    --niveau-bronze:   #CD7F32;
    --niveau-argent:   #A8A9AD;
    --niveau-or:       #D4AF37;
    --niveau-platine:  #7FD4E8;

    /* Mise en forme */
    --rayon:           12px;          /* coins arrondis demandes au cahier des charges */
    --rayon-petit:     8px;
    --ombre-douce:     0 1px 3px rgba(44, 62, 80, .08);
    --ombre-moyenne:   0 4px 12px rgba(44, 62, 80, .10);
    --ombre-forte:     0 10px 30px rgba(100, 0, 141, .14);
    --transition:      all .25s ease;

    /* Gabarit */
    --largeur-conteneur: 1180px;
    --largeur-laterale:  250px;
}

/* ------------------------------------------------------- 3. ACCESSIBILITE */
.lien-evitement {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 5000;
    background: var(--violet);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 var(--rayon-petit) 0;
}
.lien-evitement:focus { left: 0; }

/* Anneau de focus toujours visible : condition d'accessibilite au clavier. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

/* Masque visuellement tout en laissant le texte accessible aux lecteurs d'ecran. */
.lecture-seule {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------- 4. MISE EN PAGE */
.conteneur {
    width: 100%;
    max-width: var(--largeur-conteneur);
    margin: 0 auto;
    padding: 0 18px;
}

.section { padding: 46px 0; }
.section--grise { background: var(--blanc); }

.grille { display: grid; gap: 20px; }
.grille--2 { grid-template-columns: 1fr; }
.grille--3 { grid-template-columns: 1fr; }
.grille--4 { grid-template-columns: 1fr; }

.texte-centre { text-align: center; }
.texte-doux   { color: var(--texte-doux); }
.masque-mobile { display: none; }

/* ------------------------------------------------------------- 5. BOUTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--principal { background: var(--violet); color: #fff; border-color: var(--violet); }
.btn--principal:hover { background: var(--violet-fonce); border-color: var(--violet-fonce); color: #fff; }

.btn--secondaire { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn--secondaire:hover { filter: brightness(.94); color: #fff; }

.btn--fantome { background: transparent; color: var(--violet); border-color: var(--violet); }
.btn--fantome:hover { background: var(--violet-clair); }

.btn--clair { background: #fff; color: var(--violet); border-color: var(--bordure); }
.btn--clair:hover { border-color: var(--violet); }

.btn--danger { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn--danger:hover { filter: brightness(.94); color: #fff; }

.btn--petit { padding: 8px 16px; font-size: .875rem; }
.btn--large { padding: 15px 34px; font-size: 1.05rem; }
.btn--bloc  { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* ------------------------------------------------------------- 6. ALERTES */
.alerte {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--rayon-petit);
    border-left: 4px solid var(--texte-doux);
    background: #fff;
    margin-bottom: 16px;
    font-size: .95rem;
}
.alerte--succes { background: #eafaf1; border-left-color: var(--vert); color: #1b7a4b; }
.alerte--erreur { background: #fdecea; border-left-color: var(--rouge); color: #a5321f; }
.alerte--info   { background: #eaf4fc; border-left-color: var(--bleu); color: #1f618d; }
.alerte--attention { background: #fff8e1; border-left-color: var(--orange); color: #8a5a00; }

/* ---------------------------------------------------------------- 7. CARTES */
.carte {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre-douce);
    padding: 24px;
}
.carte--sans-bordure { border: 0; box-shadow: var(--ombre-moyenne); }
.carte__entete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 18px;
}
.carte__titre { font-size: 1.1rem; margin: 0; }

.bloc-page { padding: 26px 0 40px; }
.bloc-page__titre { margin-bottom: 4px; }
.bloc-page__sous-titre { color: var(--texte-doux); margin-bottom: 24px; }

/* ------------------------------------------------------------ 8. FORMULAIRES */
.champ { margin-bottom: 18px; }

.champ label,
.champ__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: .93rem;
    color: var(--texte);
}
.champ__obligatoire { color: var(--rouge); margin-left: 3px; }
.champ__aide { display: block; margin-top: 5px; font-size: .82rem; color: var(--texte-doux); }

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="tel"],
.champ input[type="password"],
.champ input[type="number"],
.champ input[type="date"],
.champ input[type="search"],
.champ input[type="file"],
.champ select,
.champ textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: #fff;
    color: var(--texte);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}
.champ textarea { min-height: 120px; resize: vertical; }

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(100, 0, 141, .12);
    outline: none;
}
.champ input[aria-invalid="true"],
.champ select[aria-invalid="true"],
.champ textarea[aria-invalid="true"] {
    border-color: var(--rouge);
}
.champ__erreur { display: block; margin-top: 5px; font-size: .82rem; color: var(--rouge); }
.champ--case { display: flex; align-items: flex-start; gap: 10px; }
.champ--case input { width: auto; margin-top: 4px; }
.champ--case label { margin: 0; font-weight: 400; }

/* Deux colonnes des 640 px de large. */
@media (min-width: 640px) {
    .champ-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
    .champ-grille--3 { grid-template-columns: repeat(3, 1fr); }
}

/* --------------------------------------------------------------- 9. TABLEAUX */
.tableau-enveloppe {
    overflow-x: auto;              /* les tableaux defilent sur mobile */
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background: #fff;
}
.tableau { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .93rem; }
.tableau th,
.tableau td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--bordure); }
.tableau th {
    background: #f9fafb;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--texte-doux);
    white-space: nowrap;
}
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: #fcfbfe; }
.tableau__montant { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau__actions { white-space: nowrap; text-align: right; }

/* ------------------------------------------ 10. ETIQUETTES ET PASTILLES */
.badge-statut {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    /* La couleur du statut est portee par la variable --couleur.
       currentColor assure la compatibilite avec tous les navigateurs,
       y compris les mobiles anciens (pas de color-mix ni de variables en rgba). */
    color: var(--couleur, var(--violet));
    background: #f7f7f9;
    border: 1px solid currentColor;
}
.badge-statut::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.pastille-niveau {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 700;
    background: var(--couleur-niveau, var(--violet));
    color: #fff;
}

.etiquette {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 50px;
    background: var(--violet-clair);
    color: var(--violet);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.badge-alerte {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--rouge);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}

/* ============================================================================
   11. EN-TETE PUBLIC
   ============================================================================ */
.entete-publique {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #fff;
    border-bottom: 1px solid var(--bordure);
    transition: var(--transition);
}
.entete-publique--ombre { box-shadow: var(--ombre-douce); }

.entete-publique__barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.marque { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.marque:hover { text-decoration: none; }

.marque__pastille {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: var(--rayon-petit);
    background: var(--violet);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}
.marque__texte { display: flex; flex-direction: column; line-height: 1.15; }
.marque__texte strong { font-size: 1.15rem; color: var(--violet); }
.marque__texte small { font-size: .72rem; color: var(--texte-doux); }

.nav-publique ul {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-publique a {
    color: var(--texte);
    font-size: .95rem;
    font-weight: 500;
    padding: 6px 0;
}
.nav-publique a:hover,
.nav-publique a.actif { color: var(--violet); text-decoration: none; }
.nav-publique a.actif { border-bottom: 2px solid var(--violet); }

.entete-publique__actions { display: flex; align-items: center; gap: 10px; }

.bouton-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: #fff;
    color: var(--violet);
    font-size: 1.1rem;
    cursor: pointer;
}
.bouton-burger:hover { background: var(--violet-clair); }

/* Sur petit ecran : menu replie, ouvert par le bouton burger. */
@media (max-width: 900px) {
    .nav-publique {
        position: fixed;
        inset: 72px 0 auto 0;
        background: #fff;
        border-bottom: 1px solid var(--bordure);
        box-shadow: var(--ombre-moyenne);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .nav-publique.ouvert { max-height: 70vh; overflow-y: auto; }
    .nav-publique ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
    .nav-publique li { border-bottom: 1px solid var(--bordure); }
    .nav-publique li:last-child { border-bottom: 0; }
    .nav-publique a { display: block; padding: 14px 20px; }
    .nav-publique a.actif { border-bottom: 0; border-left: 4px solid var(--violet); }
    .entete-publique__actions .btn { display: none; }
}
@media (min-width: 901px) {
    .bouton-burger { display: none; }
}

/* ============================================================================
   12. SECTIONS PUBLIQUES (accueil)
   ============================================================================ */
.hero {
    background: linear-gradient(135deg, var(--violet) 0%, var(--violet-fonce) 100%);
    color: #fff;
    padding: 54px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero__grille { display: grid; gap: 34px; align-items: center; }
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 16px; }
.hero__accroche { font-size: 1.08rem; opacity: .93; margin-bottom: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn--clair { background: #fff; color: var(--violet); }
.hero .btn--fantome { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btn--fantome:hover { background: rgba(255, 255, 255, .12); }

.hero__carte {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--rayon);
    padding: 24px;
    backdrop-filter: blur(2px);
}
.hero__carte h2 { color: #fff; font-size: 1.05rem; }
.hero__carte ul { list-style: none; padding: 0; margin: 0; }
.hero__carte li { display: flex; gap: 10px; padding: 7px 0; font-size: .95rem; }
.hero__carte i { color: var(--orange); margin-top: 4px; }

@media (min-width: 900px) {
    .hero { padding: 74px 0 84px; }
    .hero__grille { grid-template-columns: 1.15fr .85fr; }
    .hero h1 { font-size: 2.5rem; }
}

.etapes { counter-reset: etape; display: grid; gap: 20px; }
.etape {
    background: #fff;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
    position: relative;
}
.etape__numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--violet-clair);
    color: var(--violet);
    font-weight: 700;
    margin-bottom: 12px;
}
.etape h3 { margin-bottom: 6px; }
.etape p { margin: 0; color: var(--texte-doux); font-size: .95rem; }

.encart-legal {
    background: #fff8e1;
    border-left: 4px solid var(--orange);
    border-radius: var(--rayon-petit);
    padding: 18px 22px;
    font-size: .93rem;
}
.encart-legal strong { color: #8a5a00; }

/* ============================================================================
   13. PIED DE PAGE PUBLIC
   ============================================================================ */
.pied-public { background: #2c2c34; color: #cfd2d8; padding: 44px 0 0; margin-top: 40px; }
.pied-public__grille { display: grid; gap: 30px; padding-bottom: 34px; }
.pied-public__titre { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.pied-public__liste { list-style: none; padding: 0; margin: 0; }
.pied-public__liste li { margin-bottom: 9px; }
.pied-public__liste a { color: #cfd2d8; font-size: .93rem; display: inline-flex; align-items: center; gap: 8px; }
.pied-public__liste a:hover { color: #fff; text-decoration: none; }
.pied-public__bas {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 18px 18px 22px;
    text-align: center;
    font-size: .8rem;
    color: #9aa0a8;
}
.pied-public__bas p { max-width: 900px; margin: 0 auto; }
.marque--pied .marque__texte strong { color: #fff; }
.marque--pied .marque__texte small { color: #9aa0a8; }

@media (min-width: 780px) {
    .pied-public__grille { grid-template-columns: 1.1fr 1.2fr 1fr; }
}

/* ============================================================================
   14. ESPACE PRESCRIPTEUR : BARRE LATERALE ET STRUCTURE
   ============================================================================ */
.app-body { background: var(--fond); }

.app-barre {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 14px;
    background: var(--violet);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 950;
}
.app-barre__titre { font-weight: 500; }
.app-barre__initiales {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    font-size: .85rem;
    font-weight: 700;
}
.app-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 0;
    border-radius: var(--rayon-petit);
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

.app-laterale {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--largeur-laterale);
    background: var(--violet-fonce);
    color: #e9ddf2;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 1000;
    overflow-y: auto;
}
.app-laterale.est-ouvert { transform: translateX(0); }

.app-voile {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 999;
}

.app-marque {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    text-decoration: none;
}
.app-marque:hover { text-decoration: none; }
.app-marque .marque__pastille { background: #fff; color: var(--violet); }
.app-marque .marque__texte strong { color: #fff; }
.app-marque .marque__texte small { color: #b9a4c9; }

.app-niveau { padding: 16px 18px 6px; }
.app-niveau small { display: block; margin-top: 7px; font-size: .78rem; color: #b9a4c9; }

.app-nav { padding: 8px 10px 16px; flex: 1; }
.app-nav__label {
    display: block;
    padding: 14px 10px 6px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #a88cbb;
}
.app-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: var(--rayon-petit);
    color: #ece2f3;
    font-size: .93rem;
    text-decoration: none;
    transition: var(--transition);
}
.app-nav a i { width: 18px; text-align: center; }
.app-nav a:hover { background: rgba(255, 255, 255, .09); text-decoration: none; }
.app-nav a.actif { background: #fff; color: var(--violet); font-weight: 500; }

.app-laterale__pied {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: rgba(0, 0, 0, .16);
}
.app-utilisateur { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.app-utilisateur__initiales {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    font-weight: 700;
    flex-shrink: 0;
}
.app-utilisateur__ident { display: flex; flex-direction: column; min-width: 0; }
.app-utilisateur__ident strong { font-size: .9rem; color: #fff; }
.app-utilisateur__ident small {
    font-size: .72rem;
    color: #b9a4c9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-deconnexion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px;
    border-radius: var(--rayon-petit);
    background: rgba(231, 76, 60, .16);
    color: #ffb3ab;
    font-size: .88rem;
    text-decoration: none;
}
.app-deconnexion:hover { background: rgba(231, 76, 60, .28); text-decoration: none; color: #fff; }

.app-contenu { min-height: 60vh; padding: 22px 14px 40px; }

.pied-app {
    padding: 18px 14px 26px;
    border-top: 1px solid var(--bordure);
    background: #fff;
    text-align: center;
    font-size: .8rem;
    color: var(--texte-doux);
}
.pied-app__mention { display: block; margin-top: 4px; }
.pied-app__liens { margin: 10px 0 0; }
.pied-app__liens a { color: var(--texte-doux); }

/* A partir de 1000 px : menu lateral fixe, contenu decale. */
@media (min-width: 1000px) {
    .app-barre { display: none; }
    .app-laterale { transform: translateX(0); }
    .app-voile { display: none; }
    .app-contenu {
        margin-left: var(--largeur-laterale);
        padding: 30px 30px 50px;
    }
    .pied-app { margin-left: var(--largeur-laterale); }
}

/* ============================================================================
   15. TABLEAU DE BORD ET STATISTIQUES
   ============================================================================ */
.cartes-stats { display: grid; gap: 16px; margin-bottom: 26px; }

.carte-stat {
    background: #fff;
    border: 1px solid var(--bordure);
    border-left: 4px solid var(--violet);
    border-radius: var(--rayon);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.carte-stat__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: var(--rayon-petit);
    background: var(--violet-clair);
    color: var(--violet);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.carte-stat__valeur {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.carte-stat__libelle { font-size: .84rem; color: var(--texte-doux); }

.carte-stat--vert   { border-left-color: var(--vert); }
.carte-stat--vert .carte-stat__icone { background: #eafaf1; color: #1e8449; }
.carte-stat--orange { border-left-color: var(--orange); }
.carte-stat--orange .carte-stat__icone { background: #fff4e6; color: #b9600f; }
.carte-stat--bleu   { border-left-color: var(--bleu); }
.carte-stat--bleu .carte-stat__icone { background: #eaf4fc; color: #1f618d; }

@media (min-width: 620px)  { .cartes-stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cartes-stats { grid-template-columns: repeat(4, 1fr); } }

/* Barre de progression vers le niveau suivant */
.progression { margin: 14px 0 4px; }
.progression__barre {
    height: 12px;
    border-radius: 50px;
    background: #ececf1;
    overflow: hidden;
}
.progression__remplissage {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--violet), var(--orange));
    transition: width .5s ease;
}
.progression__legende {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    font-size: .82rem;
    color: var(--texte-doux);
}

/* ============================================================================
   16. SUIVI DU CYCLE (frise des statuts)
   ============================================================================ */
.frise { list-style: none; margin: 20px 0; padding: 0 0 0 26px; position: relative; }
.frise::before {
    content: '';
    position: absolute;
    left: 7px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--bordure);
}
.frise li { position: relative; padding: 0 0 20px 8px; font-size: .92rem; }
.frise li:last-child { padding-bottom: 0; }
.frise li::before {
    content: '';
    position: absolute;
    left: -26px; top: 5px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--bordure);
}
.frise li.fait::before    { border-color: var(--vert); background: var(--vert); }
.frise li.encours::before { border-color: var(--orange); background: var(--orange); }
.frise li.echec::before   { border-color: var(--rouge); background: var(--rouge); }
.frise__titre { font-weight: 600; }
.frise__date { font-size: .8rem; color: var(--texte-doux); display: block; }

/* ============================================================================
   17. GAMIFICATION
   ============================================================================ */
.grille-badges { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grille-badges { grid-template-columns: repeat(4, 1fr); } }

.badge-jeu {
    background: #fff;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 16px 12px;
    text-align: center;
}
.badge-jeu__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--couleur-badge, var(--violet));
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.badge-jeu__libelle { font-weight: 600; font-size: .9rem; }
.badge-jeu__date { font-size: .76rem; color: var(--texte-doux); }
.badge-jeu--verrouille { opacity: .45; filter: grayscale(1); }

.classement { list-style: none; margin: 0; padding: 0; }
.classement li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--bordure);
    font-size: .93rem;
}
.classement li:last-child { border-bottom: 0; }
.classement__rang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--violet-clair);
    color: var(--violet);
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.classement li:nth-child(1) .classement__rang { background: var(--niveau-or); color: #fff; }
.classement li:nth-child(2) .classement__rang { background: var(--niveau-argent); color: #fff; }
.classement li:nth-child(3) .classement__rang { background: var(--niveau-bronze); color: #fff; }
.classement__nom { flex: 1; min-width: 0; }
.classement__score { font-weight: 700; white-space: nowrap; }

/* ============================================================================
   18. FILTRES ET PAGINATION
   ============================================================================ */
.filtres {
    display: grid;
    gap: 12px;
    align-items: end;
    background: #fff;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 16px;
    margin-bottom: 20px;
}
.filtres .champ { margin-bottom: 0; }
@media (min-width: 780px) { .filtres { grid-template-columns: repeat(4, 1fr) auto; } }

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: #fff;
    color: var(--texte);
    font-size: .9rem;
    text-decoration: none;
}
.pagination a:hover { border-color: var(--violet); color: var(--violet); text-decoration: none; }
.pagination .actuel { background: var(--violet); border-color: var(--violet); color: #fff; font-weight: 600; }
.pagination .inactif { opacity: .45; pointer-events: none; }

/* ============================================================================
   19. ETATS VIDES ET DIVERS
   ============================================================================ */
.etat-vide { text-align: center; padding: 44px 20px; color: var(--texte-doux); }
.etat-vide i { font-size: 2.4rem; color: var(--bordure); display: block; margin-bottom: 14px; }

.chargement { display: inline-block; animation: rotation 1s linear infinite; }
@keyframes rotation { to { transform: rotate(360deg); } }

.liste-propre { list-style: none; padding: 0; margin: 0; }
.liste-propre li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bordure);
    font-size: .93rem;
}
.liste-propre li:last-child { border-bottom: 0; }
.liste-propre .valeur { font-weight: 600; white-space: nowrap; }

.separateur { border: 0; border-top: 1px solid var(--bordure); margin: 24px 0; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.mt-3 { margin-top: 20px; }
.texte-droite { text-align: right; }
.texte-rouge { color: var(--rouge); }
.texte-vert  { color: #1e8449; }
.petit-texte { font-size: .82rem; }
.gras { font-weight: 700; }
.liste-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Encadre "ce qu'il reste a faire" sur le tableau de bord */
.encart-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    background: #fff8e1;
    border: 1px solid #f5e0a3;
    border-left: 4px solid var(--orange);
    border-radius: var(--rayon);
    padding: 16px 20px;
    margin-bottom: 22px;
    font-size: .93rem;
}
.encart-action__texte { flex: 1; min-width: 220px; }

/* Montant mis en avant (portefeuille) */
.montant-vedette {
    text-align: center;
    padding: 20px;
    border-radius: var(--rayon);
    background: var(--violet-clair);
}
.montant-vedette__valeur {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--violet);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.montant-vedette__libelle { font-size: .85rem; color: #6b5b7a; }

/* ============================================================================
   20. IMPRESSION
   ============================================================================ */
@media print {
    .entete-publique, .pied-public, .app-barre, .app-laterale,
    .pied-app, .btn, .pagination, .filtres, .app-voile { display: none !important; }
    .app-contenu { margin: 0 !important; padding: 0 !important; }
    body { background: #fff; font-size: 12pt; }
    .carte { border: 0; box-shadow: none; padding: 0; }
}

/* ============================================================================
   21. DOCUMENTS JURIDIQUES (contrat, CGU, confidentialité)
   ============================================================================ */
.contrat-document,
.doc-legal {
    font-size: .95rem;
    line-height: 1.7;
    max-width: 860px;
}
.contrat-document h1,
.doc-legal h1 {
    font-size: 1.5rem;
    text-align: center;
    color: var(--violet);
    margin-bottom: 6px;
}
.contrat-document h2,
.doc-legal h2 {
    font-size: 1.05rem;
    color: var(--violet);
    margin-top: 26px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--bordure);
}
.contrat-version {
    text-align: center;
    font-size: .82rem;
    color: var(--texte-doux);
    margin-bottom: 26px;
}
.contrat-important { background: var(--violet-clair); }
.contrat-important,
.doc-important {
    padding: 14px 18px;
    border-left: 4px solid var(--violet);
    border-radius: var(--rayon-petit);
    font-size: .95rem;
}
.contrat-formule {
    background: #f8f9fa;
    border-radius: var(--rayon-petit);
    padding: 14px 18px;
    text-align: center;
    font-weight: 700;
    color: var(--violet);
}
.contrat-document ul,
.doc-legal ul { padding-left: 22px; }
.contrat-document li,
.doc-legal li { margin-bottom: 6px; }
.doc-legal p { margin-bottom: .9em; }
.doc-legal h3 { font-size: .98rem; margin-top: 18px; }



/* ============================================================================
   15. CHARTE ADOMALI.FR : EN-TETE ET PIED DE PAGE PUBLICS
   Reprise de la charte de www/style.css (logo, typographie, couleurs, menu,
   boutons) pour une identite visuelle commune aux trois sites Adomali.
   Les pages publiques uniquement : l'espace prescripteur reste inchange.
   ============================================================================ */

/* Typographie commune aux pages publiques. */
.public-body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ------------------------------------------------------------------ EN-TETE */
#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--ombre-douce);
    transition: all .3s ease;
}
#main-header.scrolled { box-shadow: 0 4px 15px rgba(0, 0, 0, .05); }
#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
#main-header.scrolled .container { height: 70px; }

.logo-link { text-decoration: none; }
.logo-link:hover { text-decoration: none; }
#main-header .logo { display: flex; align-items: center; gap: 15px; }
#main-header .logo img { height: 50px; width: auto; display: block; }
#main-header .logo-text h1 {
    margin: 0;
    color: var(--violet);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}
#main-header .logo-text p { margin: 0; font-size: .8rem; color: var(--texte-doux); }

#main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
#main-nav a {
    position: relative;
    padding: .5rem 0;
    color: var(--texte);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
#main-nav a:hover { color: var(--violet); text-decoration: none; }
#main-nav a.active { color: var(--violet); font-weight: 600; }
#main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--violet);
}

#main-header .header-actions { display: flex; align-items: center; gap: 15px; }

/* Boutons de l'en-tete (restreints a #main-header pour ne pas toucher l'espace). */
#main-header .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
#main-header .btn i { font-size: 1.1rem; }
#main-header .btn-primary { background: var(--violet); color: #fff; box-shadow: var(--ombre-forte); }
#main-header .btn-primary:hover { background: var(--violet-clair); transform: translateY(-2px); }
#main-header .btn-outline-dark { background: transparent; border: 2px solid var(--violet); color: var(--violet); }
#main-header .btn-outline-dark:hover { background: var(--violet); color: #fff; transform: translateY(-2px); }
#main-header .btn-small { padding: 8px 20px; font-size: .85rem; }

#main-header .mobile-menu-toggle {
    display: none;
    padding: 5px;
    background: transparent;
    border: none;
    color: var(--violet);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

@media (max-width: 992px) {
    #main-header .mobile-menu-toggle { display: block; }
    #main-nav {
        position: absolute;
        top: 100%; left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 15px rgba(0, 0, 0, .1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path .4s ease-in-out;
    }
    #main-nav.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    #main-nav ul { flex-direction: column; gap: 0; padding: 20px; }
    #main-nav ul li { width: 100%; border-bottom: 1px solid var(--bordure); }
    #main-nav ul li:last-child { border-bottom: none; }
    #main-nav a { display: block; padding: 15px 10px; font-size: 1.1rem; }
    #main-header .header-call-btn { padding: 10px 15px; border-radius: 50%; }
    #main-header .header-call-btn .btn-text { display: none; }
}


/* --------------------------------------------------------- PIED DE PAGE */
.main-footer {
    margin: 0;
    padding: 80px 0 30px;
    background: linear-gradient(135deg, var(--violet-fonce) 0%, #1a042e 100%);
    border-top: 5px solid var(--orange);
    color: #fff;
}
.main-footer .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-section h3 {
    position: relative;
    margin: 0 0 20px;
    padding-bottom: 10px;
    color: var(--orange);
    font-size: 1.2rem;
}
.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 2px;
    background: var(--orange);
}
.footer-section p { margin: 0 0 10px; color: rgba(255, 255, 255, .7); font-size: .95rem; line-height: 1.8; }
.footer-section ul { list-style: none; margin: 0; padding: 0; }
.footer-section ul li { margin-bottom: 8px; }
.footer-section a { color: rgba(255, 255, 255, .7); font-size: .95rem; text-decoration: none; transition: var(--transition); }
.footer-section a:hover { color: var(--orange); padding-left: 5px; }

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
    line-height: 1.5;
}
.contact-list li i { margin-top: 4px; color: var(--orange); font-size: 1.1rem; }

.footer-links li { margin-bottom: 12px; }
.footer-links a {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a::before {
    content: '\203A';
    margin-right: 8px;
    color: var(--orange);
    font-size: 1.5rem;
    line-height: 0;
    transition: var(--transition);
}
.footer-links a:hover { color: #fff; transform: translateX(5px); }

.main-footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .5);
    font-size: .9rem;
}
.main-footer .footer-bottom p { margin: 0; }


/* Ecrans intermediaires : on resserre le menu public avant le passage en burger,
   afin d'eviter que les libelles se chevauchent (logo + menu + actions). */
@media (max-width: 1250px) and (min-width: 993px) {
    #main-header .logo-text p { display: none; }
    #main-nav ul { gap: .9rem; }
    #main-nav a { font-size: .85rem; }
    #main-header .header-actions { gap: 8px; }
    #main-header .btn { padding: 8px 14px; }
}

