:root {
  --encre: #0B1B3F;
  --encre-douce: #4A5875;
  --fond: #F4F6FA;
  --surface: #FFFFFF;
  --ligne: #DCE2EC;
  --lagon: #0B4FD8;
  --lagon-fonce: #08389E;
  --lagon-pale: #E7EEFF;
  --mangue: #F7A600;
  --mangue-pale: #FEF4DC;
  --rouge: #B42318;
  --rouge-pale: #FDECEA;
  --vert: #1F7A4A;
  --vert-pale: #E6F4EC;
  --titre: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --texte: "Manrope", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.6 var(--texte); }
a { color: var(--lagon-fonce); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--mangue); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.4rem; font-weight: 700; margin-top: 2rem; }
h3 { font-size: 1.1rem; font-weight: 500; }
p { margin: 0 0 1em; max-width: 70ch; }
.discret { color: var(--encre-douce); }
.petit { font-size: .875rem; }

.barre { background: var(--surface); color: var(--encre); border-bottom: 1px solid var(--ligne); box-shadow: 0 1px 0 rgba(11,27,63,.03); }
.barre-int { max-width: 1120px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.marque { display: inline-flex; align-items: center; text-decoration: none; }
.marque img { display: block; height: 40px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.nav a { color: var(--encre-douce); text-decoration: none; font-weight: 500; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--mangue); }
.nav .nav-sortie { color: #8A96AD; }
.nav .btn { border-bottom: 0; color: #fff; }
.nav .btn:hover { color: #fff; }

.page { max-width: 1120px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.pied { border-top: 1px solid var(--ligne); color: var(--encre-douce); font-size: .875rem; }
.pied .barre-int { padding: 1.25rem; }

.btn { display: inline-block; background: var(--lagon); color: #fff; border: 0; border-radius: 6px; padding: .7rem 1.2rem; font: 700 1rem var(--texte); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--lagon-fonce); }
.btn-petit { padding: .4rem .8rem; font-size: .9rem; }
.btn-mangue { background: var(--mangue); color: var(--encre); }
.btn-mangue:hover { background: #D99413; }
.btn-ligne { background: transparent; color: var(--encre); border: 1.5px solid var(--ligne); }
.btn-ligne:hover { background: var(--surface); border-color: var(--encre-douce); }
.btn-danger { background: var(--rouge); }
.btn-danger:hover { background: #8F1C13; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.panneau { background: var(--surface); border: 1px solid var(--ligne); border-radius: 10px; padding: 1.5rem; margin-bottom: 1.5rem; }
.grille { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.chiffres { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); background: var(--ligne); border: 1px solid var(--ligne); border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; }
.chiffre { background: var(--surface); padding: 1.1rem 1.25rem; }
.chiffre strong { display: block; font: 700 1.5rem var(--titre); }
.chiffre span { color: var(--encre-douce); font-size: .9rem; }

.carte-formation { background: var(--surface); border: 1px solid var(--ligne); border-left: 5px solid var(--lagon); border-radius: 8px; padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.carte-formation h3 { margin: 0; }
.carte-formation .prix { font: 700 1.25rem var(--titre); }
.carte-formation .actions { margin-top: auto; padding-top: .5rem; }

/* Le code d'accès : l'élément signature, présenté comme un billet à déchirer */
.billet { display: inline-flex; align-items: center; gap: 1rem; background: var(--mangue-pale); border: 2px dashed var(--mangue); border-radius: 10px; padding: .9rem 1.4rem; }
.billet code { font: 700 clamp(1.6rem, 5vw, 2.4rem) var(--titre); letter-spacing: .12em; color: var(--encre); }
.saisie-code { font: 700 1.6rem var(--titre); letter-spacing: .14em; text-transform: uppercase; text-align: center; max-width: 320px; }

form .champ { margin-bottom: 1rem; }
label { display: block; font-weight: 700; margin-bottom: .3rem; }
.aide { display: block; font-weight: 400; color: var(--encre-douce); font-size: .875rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; max-width: 520px; padding: .65rem .75rem; border: 1.5px solid var(--ligne); border-radius: 6px; font: inherit; background: #fff; color: var(--encre);
}
textarea { min-height: 120px; max-width: 720px; }
.case { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.case input { width: auto; }
.ligne-form { display: flex; flex-wrap: wrap; gap: 1rem; }
.ligne-form .champ { flex: 1 1 200px; }
.form-etroit { max-width: 460px; }

.table-defile { overflow-x: auto; background: var(--surface); border: 1px solid var(--ligne); border-radius: 10px; margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--ligne); vertical-align: top; }
th { font-weight: 700; color: var(--encre-douce); font-size: .85rem; background: #F8FAFC; }
tr:last-child td { border-bottom: 0; }
td.nombre, th.nombre { text-align: right; white-space: nowrap; }

.etat { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--fond); color: var(--encre-douce); white-space: nowrap; }
.etat-ok { background: var(--vert-pale); color: var(--vert); }
.etat-attente { background: var(--mangue-pale); color: #8A5A00; }
.etat-ko { background: var(--rouge-pale); color: var(--rouge); }
.etat-info { background: var(--lagon-pale); color: var(--lagon-fonce); }

.alerte { padding: .85rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; border: 1px solid; }
.alerte-succes { background: var(--vert-pale); border-color: #B7DEC8; color: var(--vert); }
.alerte-erreur { background: var(--rouge-pale); border-color: #F5C2BD; color: var(--rouge); }
.alerte-info { background: var(--lagon-pale); border-color: #B5DDE0; color: var(--lagon-fonce); }

.accueil { display: grid; gap: 2.5rem; grid-template-columns: 1.2fr 1fr; align-items: center; padding: 2rem 0; }
.accueil h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.etapes { list-style: none; padding: 0; margin: 0; counter-reset: e; }
.etapes li { counter-increment: e; padding: .9rem 0 .9rem 3rem; position: relative; border-bottom: 1px solid var(--ligne); }
.etapes li::before { content: counter(e); position: absolute; left: 0; top: .8rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--encre); color: #fff; display: grid; place-items: center; font: 700 .95rem var(--titre); }

.session { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 0; border-bottom: 1px solid var(--ligne); }
.session:last-child { border-bottom: 0; }
.video { width: 100%; max-width: 960px; border-radius: 10px; background: #000; display: block; }

@media (max-width: 760px) {
  .accueil { grid-template-columns: 1fr; padding: 0; }
  .page { padding-top: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.deux-colonnes { display: grid; gap: 1.5rem; grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 760px) { .deux-colonnes { grid-template-columns: 1fr; } }

.logo-accueil { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 0 1.5rem -6px; }
.logo-a { display: block; width: 56px; height: 56px; margin-bottom: .75rem; }
.pied-marque { display: inline-flex; align-items: center; gap: .45rem; }
.pied-marque img { width: 20px; height: 20px; }
@media (max-width: 760px) { .marque img { height: 32px; } .logo-accueil { display: none; } }
.nav .btn { padding: .45rem .95rem; border-radius: 6px; }
.accueil h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
.recherche .champ { flex: 0 1 520px; }

.carte-acces { max-width: 440px; margin: 1.5rem auto 0; background: var(--surface); border: 1px solid var(--ligne); border-top: 4px solid var(--mangue); border-radius: 12px; padding: 2rem 2rem 1.5rem; box-shadow: 0 10px 30px rgba(11,27,63,.06); }
.carte-acces h1 { font-size: 1.8rem; margin-bottom: .25rem; }
.carte-acces > .discret { margin-bottom: 1.5rem; }
.carte-acces input[type=text], .carte-acces input[type=email], .carte-acces input[type=password], .carte-acces input[type=tel] { max-width: none; }
.btn-large { width: 100%; padding: .85rem 1.2rem; }
.carte-acces-pied { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--ligne); font-size: .95rem; color: var(--encre-douce); text-align: center; line-height: 1.9; }
@media (max-width: 760px) { .carte-acces { margin-top: .5rem; padding: 1.5rem 1.25rem 1.25rem; } }

/* Page de connexion : grand logo centré dans la carte ; le petit logo de la barre est masqué pour éviter le doublon */
.page-connexion .barre .marque { visibility: hidden; }
.carte-acces-logo { text-align: center; }
.carte-acces-logo form, .carte-acces-logo .alerte { text-align: left; }
.logo-carte { display: block; width: 100%; max-width: 320px; height: auto; margin: .25rem auto 1.75rem; }
@media (max-width: 760px) { .page-connexion .barre .marque { display: none; } .logo-carte { max-width: 260px; margin-bottom: 1.25rem; } }

/* Boutons du visiteur : « Se connecter » doré, « Créer un compte » bleu */
.nav-boutons { display: inline-flex; gap: .5rem; align-items: center; }
.nav .btn-connexion, .nav .btn-connexion:hover { background: var(--mangue); color: var(--encre); }
.nav .btn-connexion:hover { background: #E09600; }
.marque img { height: 46px; }
@media (max-width: 760px) {
  .barre-int { row-gap: .75rem; }
  .marque img { height: 48px; }
  .nav-visiteur { width: 100%; gap: .4rem 1.25rem; }
  .nav-boutons { display: flex; width: 100%; gap: .6rem; margin-top: .25rem; }
  .nav-boutons .btn { flex: 1; text-align: center; padding: .7rem .5rem; font-size: 1rem; }
}

/* Logos des moyens de paiement */
.logos-paiement { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.logos-paiement li { display: flex; align-items: center; height: 34px; padding: 0 .55rem; background: #fff; border: 1px solid var(--ligne); border-radius: 6px; }
.logos-paiement img { display: block; height: 22px; width: auto; max-width: 90px; }
.badge-paiement { font-size: .8rem; font-weight: 700; color: var(--encre); letter-spacing: .01em; }
.pied-paiement { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.pied-paiement-titre { font-size: .85rem; }
.logos-paiement-formation { margin-top: 1rem; }
@media (max-width: 760px) { .pied .barre-int { flex-direction: column; align-items: flex-start; gap: 1rem; } }

.logos-paiement li.avec-logo { height: auto; padding: 0; border: 0; background: none; }
.logos-paiement li.avec-logo img { width: 62px; height: 40px; max-width: none; object-fit: contain; }
.logos-paiement { gap: .6rem; }
.logos-paiement-formation { gap: .5rem; }
.logos-paiement-formation li.avec-logo img { width: 48px; height: 32px; }

/* Menu du compte connecté */
.barre-int > .nav:not(.nav-visiteur) { margin-left: auto; }
.menu-compte { position: relative; }
.menu-compte summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; padding: .3rem .55rem .3rem .3rem; border: 1px solid var(--ligne); border-radius: 999px; background: var(--surface); color: var(--encre); font-weight: 600; }
.menu-compte summary::-webkit-details-marker { display: none; }
.menu-compte summary:hover, .menu-compte[open] summary { border-color: var(--encre-douce); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--lagon); color: #fff; display: grid; place-items: center; font: 700 .85rem var(--texte); letter-spacing: .02em; flex: none; }
.menu-compte-nom { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--encre-douce); transition: transform .15s; }
.menu-compte-prenom { display: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-compte[open] .chevron { transform: rotate(180deg); }
.menu-compte-liste { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 250px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 10px; box-shadow: 0 12px 32px rgba(11,27,63,.12); padding: .4rem; z-index: 50; }
.menu-compte-entete { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .7rem .75rem; border-bottom: 1px solid var(--ligne); margin-bottom: .3rem; }
.menu-compte-entete span { font-size: .85rem; color: var(--encre-douce); overflow-wrap: anywhere; }
.menu-compte-entete .etat { align-self: flex-start; margin-top: .3rem; }
.menu-compte-liste a { display: block; padding: .55rem .7rem; border-radius: 6px; color: var(--encre); text-decoration: none; }
.menu-compte-liste a:hover { background: var(--fond); }
.menu-compte-liste .menu-compte-sortie { color: var(--rouge); border-top: 1px solid var(--ligne); border-radius: 0 0 6px 6px; margin-top: .3rem; }
@media (max-width: 760px) {
  .barre-int { position: relative; }
  .menu-compte { position: absolute; top: .9rem; right: 1.25rem; }
  .menu-compte-nom { display: none; }
  .menu-compte-prenom { display: inline; }
  .menu-compte summary { padding: .25rem .45rem .25rem .25rem; }
  .barre-int > .nav:not(.nav-visiteur) { margin-left: 0; width: 100%; }
}
