/* Espace client (moncompte) : clair, calme, lisible sur téléphone. Aucune ressource externe (voir la CSP posée par EspaceClientSubscriber). */
:root { --violet: #4b2a8f; --violet-clair: #efe9fb; --encre: #1d1a26; --discret: #6b6578; --fond: #faf8fd; --ligne: #e4def0; --vert: #1e7e34; --rouge: #a3262a; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--encre); background: var(--fond); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 880px; width: 100%; margin: 0 auto; padding: 22px 16px 6px; }
.entete__logo img { display: block; height: 40px; width: auto; }
.entete__sortie { font-size: 14px; color: var(--discret); }
.page { flex: 1; max-width: 880px; width: 100%; margin: 0 auto; padding: 16px 16px 40px; }
.bienvenue h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 18px 0 8px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.surtitre { margin: 6px 0 0; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--discret); margin: 0 0 20px; max-width: 640px; }
.carte { background: #fff; border: 1px solid var(--ligne); border-radius: 18px; padding: 22px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(75, 42, 143, .05); }
.carte--etroite { max-width: 460px; margin: 28px auto; }
.carte h1 { font-size: 26px; margin: 0 0 8px; }
.carte h2 { font-size: 20px; margin: 0 0 12px; color: var(--violet); }
.documents { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.document { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 14px; background: var(--fond); }
.document__texte { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; }
.document__titre { font-weight: 700; overflow-wrap: anywhere; }
.document__meta { font-size: 14px; color: var(--discret); }
.vide { margin: 0; color: var(--discret); }
.pastille { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--violet-clair); color: var(--violet); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pastille--ok { background: #e6f4ea; color: var(--vert); }
.bouton { display: inline-block; padding: 12px 22px; border: 2px solid var(--violet); border-radius: 999px; background: var(--violet); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.bouton:hover { filter: brightness(1.12); }
.bouton--contour { background: #fff; color: var(--violet); }
.bouton--petit { padding: 8px 16px; font-size: 14px; }
.formulaire { display: grid; gap: 8px; margin: 16px 0 8px; }
.formulaire label { font-weight: 700; font-size: 15px; margin-top: 6px; }
.formulaire input[type=email], .formulaire input[type=password] { width: 100%; padding: 12px 14px; border: 1px solid #c9bfe0; border-radius: 12px; font: inherit; background: #fff; }
.formulaire input:focus-visible, .bouton:focus-visible, a:focus-visible { outline: 3px solid #9b7ee0; outline-offset: 2px; }
.formulaire .bouton { margin-top: 14px; }
.criteres { margin: 4px 0 8px; padding-left: 20px; color: var(--discret); font-size: 14px; }
.alerte { background: #fdecec; border: 1px solid #f3c2c3; color: var(--rouge); border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.alerte ul { margin: 0; padding-left: 18px; }
.petit { font-size: 14px; color: var(--discret); }
.pied { max-width: 880px; width: 100%; margin: 0 auto; padding: 8px 16px 28px; font-size: 14px; color: var(--discret); }
.carte__tete { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.carte__tete h2 { margin: 0; }
.carte__mot { margin: 2px 0 0; color: var(--discret); font-size: 15px; }
.carte__icone { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; background: var(--teinte, var(--violet-clair)); color: var(--accent, var(--violet)); }
.carte--devis { --accent: #5b3aa8; --teinte: #efe9fb; border-top: 4px solid #9a80d6; }
.carte--contrat { --accent: #1f6b55; --teinte: #e5f3ec; border-top: 4px solid #66b39c; }
.carte--facture { --accent: #8a5a12; --teinte: #fff0dc; border-top: 4px solid #eab16c; }
.carte--devis h2 { color: #5b3aa8; } .carte--contrat h2 { color: #1f6b55; } .carte--facture h2 { color: #8a5a12; }
.carte .vide { padding: 14px 16px; border: 1px dashed #cfc6e3; border-radius: 12px; background: var(--fond); }
.pastille--attente { background: #fff0dc; color: #8a5a12; }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--ligne); border-radius: 18px; padding: 22px; margin: 8px 0 0; }
.contact h2 { margin: 0 0 4px; font-size: 20px; }
.contact p { margin: 0; color: var(--discret); }
.contact__liens { display: flex; flex-wrap: wrap; gap: 10px; }
a { color: var(--violet); }
@media (max-width: 520px) { .carte, .contact { padding: 16px; } .document .bouton, .contact__liens .bouton { width: 100%; } .contact__liens { width: 100%; } }

/* ===== Accueil connecté : menu à gauche, bandeau, trois cartes ===== */
.coque { display: flex; min-height: 100vh; width: 100%; }
.menu { width: 268px; flex: 0 0 268px; background: #fff; border-right: 1px solid var(--ligne); padding: 28px 20px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.menu__logo img { display: block; height: 38px; width: auto; margin: 0 0 26px 6px; }
.menu__commune { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f6f3fc; border: 1px solid var(--ligne); border-radius: 14px; margin-bottom: 26px; }
.menu__commune strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.menu__commune small { color: var(--discret); font-size: 14px; }
.menu__lettre { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 11px; background: var(--violet-clair); color: var(--violet); font-weight: 800; font-size: 18px; }
.menu__etiquette { margin: 0 0 8px 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--discret); }
.menu nav { display: grid; gap: 4px; }
.menu__lien { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 14px; border-radius: 12px; color: #3d3850; text-decoration: none; font-size: 16px; transition: background .2s, transform .2s; }
.menu__lien:hover { background: #f3eefd; transform: translateX(3px); }
.menu__lien--actif { background: var(--violet-clair); color: var(--violet); font-weight: 700; }
.menu__nombre { background: #fff; border: 1px solid var(--ligne); border-radius: 8px; padding: 1px 9px; font-size: 14px; color: var(--discret); }
.menu__aide { margin-top: auto; background: #f6f3fc; border-radius: 16px; padding: 18px; }
.menu__aide strong { display: block; font-size: 16px; }
.menu__aide p { margin: 6px 0 10px; color: var(--discret); font-size: 15px; }
.menu__aide a { font-weight: 700; text-decoration: none; }
.menu__sortie { display: block; margin: 16px 0 0 6px; color: var(--discret); text-decoration: none; font-size: 15px; }
.menu__sortie:hover { color: var(--violet); }
.principal { flex: 1; min-width: 0; max-width: 1180px; padding: 36px 44px 28px; margin: 0 auto; scroll-margin-top: 16px; }
html { scroll-behavior: smooth; }
.principal__tete h1 { font-size: clamp(30px, 4vw, 42px); margin: 8px 0 6px; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.principal__tete .lead { margin: 0 0 22px; }
.principal__tete .surtitre { margin: 0; }

.banniere { position: relative; display: flex; align-items: center; min-height: 0; border-radius: 18px; background: linear-gradient(120deg, #ece6fb 0%, #e4dbf8 55%, #f3e6f6 100%); overflow: hidden; margin-bottom: 8px; }
.banniere__texte { position: relative; z-index: 1; padding: 20px 28px; max-width: 600px; }
.banniere__etiquette { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6a4fb0; }
.banniere h2 { margin: 4px 0 6px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.15; letter-spacing: -.02em; color: #3b2766; }
.banniere__texte p { margin: 0; color: #5d4d7e; font-size: 16px; }
.banniere__lien { display: inline-block; margin-top: 8px; font-weight: 700; color: #4b2a8f; text-decoration: none; transition: transform .2s; }
.banniere__lien:hover { transform: translateX(5px); }
.banniere__dessin { position: absolute; right: 5%; top: 0; bottom: 0; width: 200px; overflow: hidden; }
.banniere__dessin::before, .banniere__dessin::after { content: ""; position: absolute; border: 1px solid #d8cdf3; border-radius: 50%; }
.banniere__dessin::before { width: 150px; height: 150px; top: -20px; left: 25px; }
.banniere__dessin::after { width: 220px; height: 220px; top: -60px; left: -10px; }
.feuille { position: absolute; width: 74px; height: 94px; border-radius: 9px; top: 22px; left: 62px; box-shadow: 0 16px 30px rgba(75, 42, 143, .15); }
.feuille--arriere { background: #c8b8ee; transform: rotate(-15deg) translate(-26px, -4px); animation: flotte 6s ease-in-out infinite; }
.feuille--avant { background: #fff; transform: rotate(10deg); padding: 12px 10px; animation: flotte 6s ease-in-out -2s infinite; }
.feuille i { display: block; height: 4px; border-radius: 2px; background: #e6e0f3; margin: 0 0 7px; }
.feuille i:first-child { background: #7b62b5; width: 55%; margin-bottom: 10px; }
.feuille i.court { width: 60%; }
.feuille b { position: absolute; right: 8px; bottom: 8px; width: 20px; height: 20px; line-height: 20px; font-size: 12px; text-align: center; border-radius: 50%; background: #e3f4ea; color: #2c7a55; }

.titre-section { margin: 30px 0 4px; font-size: 24px; letter-spacing: -.02em; scroll-margin-top: 16px; }
.titre-section__nombre { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 1px 10px; border: 1px solid var(--ligne); border-radius: 8px; font-size: 15px; color: var(--discret); background: #fff; }
.sous-titre-section { margin: 0 0 16px; color: var(--discret); }
.grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grille .carte { margin: 0; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; animation: monte .5s ease both; }
.grille .carte:nth-child(2) { animation-delay: .08s; } .grille .carte:nth-child(3) { animation-delay: .16s; }
.grille .carte:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(75, 42, 143, .12); }
.grille .carte__tete { justify-content: space-between; margin-bottom: 12px; }
.grille .carte h3 { margin: 0 0 4px; font-size: 21px; color: var(--accent); }
.grille .carte__mot { margin: 0 0 14px; }
.grille .documents { margin-top: auto; }
.grille .document { flex-direction: column; align-items: stretch; }
.grille .document__texte { flex: 0 0 auto; }
.grille .document .bouton { width: 100%; }
.etat { padding: 4px 12px; border: 1px solid var(--ligne); border-radius: 999px; font-size: 14px; color: var(--discret); background: #fff; }
.etat--ok { background: #e6f4ea; border-color: #bfe0c9; color: var(--vert); font-weight: 700; }
.contact { margin-top: 22px; }
.pied-accueil { text-align: center; color: var(--discret); font-size: 14px; margin: 22px 0 0; }

@keyframes monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 1080px) { .grille { grid-template-columns: 1fr; } .banniere__dessin { opacity: .55; right: -40px; } }
@media (max-width: 820px) {
  .coque { display: block; }
  .menu { position: static; width: 100%; height: auto; flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--ligne); }
  .menu__logo img { margin: 0; height: 34px; }
  .menu__commune, .menu__etiquette, .menu__aide { display: none; }
  .menu nav { display: flex; flex: 1 0 100%; order: 3; gap: 6px; flex-wrap: wrap; }
  .menu__lien { padding: 10px 12px; font-size: 15px; background: #f6f3fc; }
  .menu__lien--actif { background: var(--violet-clair); }
  .menu__sortie { margin: 0 0 0 auto; order: 2; }
  .principal { padding: 22px 16px 24px; }
  .banniere { min-height: 0; }
  .banniere__texte { padding: 24px 20px; }
  .banniere__dessin { display: none; }
}

/* ===== Pages : avancement, prise en main, ressources ===== */
.barre { display: block; width: 100%; height: 10px; border: 0; border-radius: 999px; background: #e7e1f4; overflow: hidden; appearance: none; -webkit-appearance: none; }
.barre::-webkit-progress-bar { background: #e7e1f4; border-radius: 999px; }
.barre::-webkit-progress-value { background: linear-gradient(90deg, #7b5cd6, #c06fb8); border-radius: 999px; transition: width .6s; }
.barre::-moz-progress-bar { background: linear-gradient(90deg, #7b5cd6, #c06fb8); border-radius: 999px; }
.barre--grande { height: 16px; }
.menu__aide .barre { height: 8px; margin: 0 0 10px; }

.synthese { display: flex; align-items: center; gap: 24px; background: #fff; border: 1px solid var(--ligne); border-radius: 18px; padding: 22px 26px; margin: 4px 0 16px; animation: monte .5s ease both; }
.synthese__chiffre { display: grid; place-items: center; flex: 0 0 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, #efe9fb, #f6e7f3); text-align: center; }
.synthese__chiffre strong { font-size: 38px; line-height: 1; color: var(--violet); }
.synthese__chiffre small { font-size: 18px; }
.synthese__chiffre span { font-size: 13px; color: var(--discret); margin-top: -26px; }
.synthese__texte { flex: 1; min-width: 0; }
.synthese__texte h2 { margin: 0 0 12px; font-size: 21px; }
.synthese__fete { margin: 12px 0 0; font-weight: 700; color: var(--vert); }
.attention { background: #fdecec; border: 1px solid #f3c2c3; color: #7d1f23; border-radius: 14px; padding: 12px 16px; margin: 0 0 18px; }

.phases { list-style: none; margin: 0; padding: 0; position: relative; }
.phases::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: repeating-linear-gradient(#cfc6e3 0 6px, transparent 6px 12px); }
.phase { position: relative; display: flex; gap: 16px; align-items: flex-start; margin: 0 0 12px; animation: monte .5s ease both; }
.phase:nth-child(2) { animation-delay: .06s; } .phase:nth-child(3) { animation-delay: .12s; } .phase:nth-child(4) { animation-delay: .18s; } .phase:nth-child(5) { animation-delay: .24s; } .phase:nth-child(6) { animation-delay: .3s; }
.phase__numero { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: #d9d3e6; color: #fff; font-weight: 800; }
.phase--en_cours .phase__numero { background: var(--violet); box-shadow: 0 0 0 5px #e6defa; animation: pulse 2.4s ease-in-out infinite; }
.phase--valide .phase__numero { background: #2e8b57; }
.phase details { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--ligne); border-radius: 14px; transition: box-shadow .2s; }
.phase details[open] { box-shadow: 0 8px 20px rgba(75, 42, 143, .09); }
.phase summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 16px; cursor: pointer; list-style: none; font-weight: 700; }
.phase summary::-webkit-details-marker { display: none; }
.phase summary::after { content: "▾"; margin-left: auto; color: var(--discret); transition: transform .2s; }
.phase details[open] summary::after { transform: rotate(180deg); }
.phase summary:focus-visible { outline: 3px solid #9b7ee0; outline-offset: 2px; border-radius: 14px; }
.phase__etat { font-size: 14px; padding: 3px 12px; border-radius: 999px; background: #eee9f6; color: var(--discret); font-weight: 700; }
.phase__etat--en_cours { background: #e6defa; color: var(--violet); }
.phase__etat--valide { background: #e6f4ea; color: var(--vert); }
.phase__corps { padding: 2px 16px 16px; }
.points { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.point { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--fond); border: 1px solid var(--ligne); }
.point__nom { font-weight: 700; }
.point__etat { font-size: 14px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #eee9f6; color: var(--discret); }
.point--ok .point__etat { background: #e6f4ea; color: var(--vert); }
.point--en_cours .point__etat { background: #e6defa; color: var(--violet); }
.point--attente { border-color: #f3c2c3; background: #fff5f5; }
.point--attente .point__nom { color: var(--rouge); }
.point--attente .point__etat { background: #fdecec; color: var(--rouge); }
.phase__message { margin: 8px 0 0; padding: 12px 14px; border-left: 4px solid #b9a5e8; background: #f6f2fd; border-radius: 0 12px 12px 0; }

.banniere--demo { margin-bottom: 18px; }
.banniere--demo .bouton { margin-top: 12px; }
.niveau { background: #fff; border: 1px solid var(--ligne); border-radius: 18px; padding: 20px 24px; margin: 0 0 8px; }
.niveau__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.niveau__tete h2 { margin: 0; font-size: 22px; }
.niveau__points { font-weight: 700; color: var(--violet); }
.niveau__marches { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.niveau__marche { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: var(--fond); border: 1px solid var(--ligne); color: var(--discret); font-size: 14px; }
.niveau__marche--atteint { background: #efe9fb; border-color: #cbbaf0; color: var(--violet); font-weight: 700; }
.missions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.mission { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--ligne); border-radius: 14px; padding: 12px 16px; transition: transform .2s, box-shadow .2s; }
.mission:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(75, 42, 143, .08); }
.mission__case { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border: 2px solid #cfc6e3; border-radius: 9px; color: #fff; font-weight: 800; }
.mission--faite .mission__case { background: #2e8b57; border-color: #2e8b57; }
.mission--faite .mission__texte strong { text-decoration: line-through; text-decoration-color: #b8b0c9; }
.mission__texte { flex: 1 1 240px; display: flex; flex-direction: column; min-width: 0; }
.mission__texte span { color: var(--discret); font-size: 15px; }
.mission__points { font-weight: 800; color: #8a5a12; background: #fff0dc; border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.mission form { margin: 0; }

.grille--deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.carte--lien { display: block; text-decoration: none; color: inherit; border-top: 4px solid #9a80d6; }
.carte--lien h3 { color: var(--violet); font-size: 19px; margin: 0 0 6px; }
.carte__aller { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--violet); }
.carte--lien:hover .carte__aller { text-decoration: underline; }

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px #e6defa; } 50% { box-shadow: 0 0 0 9px #efe9fb; } }
@media (max-width: 1080px) { .grille--deux { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .synthese { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .synthese__chiffre { flex-basis: auto; width: 96px; height: 96px; }
  .synthese__chiffre strong { font-size: 30px; } .synthese__chiffre span { margin-top: -18px; font-size: 12px; }
  .niveau__marches { grid-template-columns: repeat(2, 1fr); }
  .phases::before { left: 15px; }
  .phase { gap: 10px; } .phase__numero { flex-basis: 32px; width: 32px; height: 32px; border-radius: 10px; }
  .mission .bouton, .mission .etat { margin-left: auto; }
}
