/* =====================================================================
   Les Conseils de Daniel — Feuille de style
   ===================================================================== */

:root{
  --blue:        #013ca7;
  --blue-dark:   #003499;
  --blue-light:  #0145b4;
  --yellow:      #f4bc0f;
  --black:       #101010;
  --green:       #1a9d1a;
  --green-dark:  #0c7a0c;
  --grey:        #555;
  --grey-light:  #f3f5fa;
  --border:      #d8deea;
  --red:         #d12027;

  --font-title:  'Montserrat', 'Segoe UI', sans-serif;
  --font-body:   'Open Sans', 'Segoe UI', Arial, sans-serif;

  --maxw: 1100px;
  --radius: 8px;
}

*{ box-sizing:border-box; }

html,body{ margin:0; padding:0; }

body{
  font-family: var(--font-body);
  color: var(--black);
  background:#fff;
  line-height:1.6;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

img{ max-width:100%; height:auto; display:block; }
a{ color: var(--blue); }

/* ---------------------------------------------------------------------
   NAVBAR
--------------------------------------------------------------------- */
.navbar{
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-light));
  color:#fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  position:sticky; top:0; z-index:50;
}
.navbar-inner{
  max-width: var(--maxw);
  margin:0 auto;
  padding: 0 18px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.navbar-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family: var(--font-title);
  font-weight:600;
  font-size: clamp(1.05rem, 3.5vw, 1.2rem);
  color:#fff;
  text-decoration:none;
  letter-spacing:.3px;
}
.navbar-logo{
  height:48px;
  width:auto;
  display:block;
  border-radius:6px;
}
.navbar-actions{ display:flex; align-items:center; gap:12px; }
.navbar-user{ color:#fff; font-size:.9rem; opacity:.9; }

/* ---------------------------------------------------------------------
   BOUTONS
--------------------------------------------------------------------- */
.btn{
  display:inline-block;
  font-family: var(--font-title);
  font-weight:600;
  text-align:center;
  text-decoration:none;
  border:none;
  border-radius: var(--radius);
  padding: 14px 26px;
  font-size:1rem;
  cursor:pointer;
  transition: filter .15s ease, transform .05s ease;
  line-height:1.25;
}
.btn:hover{ filter:brightness(1.07); }
.btn:active{ transform: translateY(1px); }
.btn-sm{ padding:8px 16px; font-size:.9rem; }
.btn-block{ display:block; width:100%; }

.btn-blue{ background: linear-gradient(90deg,var(--blue-dark),var(--blue-light)); color:#fff; }
.btn-yellow{ background: var(--yellow); color: var(--black); }
.btn-light{ background:#fff; color: var(--blue); border:2px solid #fff; }
.btn-light:hover{ background:#eef2fb; }
.btn-green{
  background: var(--green);
  color:#fff;
  border:2px solid var(--green-dark);
  text-transform:none;
  font-weight:400;
  font-size:1.15rem;
  padding:18px 26px;
  width:100%;
}
/* Sous-ligne plus petite dans les boutons verts (ex: "Pour commander…") */
.btn-green .cta-sub{
  display:inline-block;
  font-size:.78rem;
  font-weight:400;
  letter-spacing:.2px;
  margin-bottom:2px;
}
.btn-dark{ background: var(--black); color:#fff; }
.btn-logout{ background:#e40d59; color:#fff; }

/* ---------------------------------------------------------------------
   LAYOUT GÉNÉRIQUE
--------------------------------------------------------------------- */
.page{ flex:1 0 auto; }
.container{
  max-width: var(--maxw);
  margin:0 auto;
  padding: 28px 18px 60px;
}
.container-narrow{ max-width: 760px; }

.section-title{
  font-family: var(--font-title);
  color: var(--blue);
  text-align:center;
  font-weight:800;
  font-size: clamp(1.15rem, 3.6vw, 1.6rem);
  line-height:1.3;
  margin: 18px 0 26px;
}
.accent{ color: var(--blue); }
.text-yellow{ color: var(--yellow); }
.text-green{ color: var(--green-dark); }
.text-red{ color: var(--red); }

/* Bandeau / hero image */
.hero-banner{
  width: fit-content;     /* épouse la largeur de l'image */
  max-width: 100%;
  margin: 0 auto 29px;    /* centré horizontalement (14px + 15px) */
}
.hero-banner img{
  display:block;
  border-radius: 10px;    /* coins arrondis sur l'image elle-même */
}

/* ---------------------------------------------------------------------
   ACCUEIL
--------------------------------------------------------------------- */
.home-hero{
  max-width: 640px;
  margin: 6px auto 0;
  border-radius:10px;
  overflow:hidden;
  box-shadow: 0 6px 24px rgba(1,60,167,.18);
}
.home-text{
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.3;
}
.home-text p{ margin: 0 0 5px; }
.home-text-wide{ max-width:none; }
/* Neutralise les lignes vides créées par l'éditeur (<p><br></p>, <p></p>, <div><br></div>) */
.home-text :is(p, div):empty,
.home-text :is(p, div):has(> br:only-child){ display:none; }
.home-text .accent{ text-align:center; font-size:1.08rem; }

.cta-wrap{ max-width: 600px; margin: 34px auto 0; }

/* ---------------------------------------------------------------------
   FORMATION  (desktop : 2 colonnes / mobile : empilé)
--------------------------------------------------------------------- */
.formation-grid{
  display:grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "player"
    "chapters"
    "order";
  gap: 26px;
  margin-top: 22px;
}
/* Mobile : le conteneur s'efface pour que player / prix-bouton suivent la grille,
   et restent répartis player → chapitres → prix/bouton (en bas). */
.formation-main{ display: contents; }
.blk-player{ grid-area: player; }
.blk-chapters{ grid-area: chapters; }
.blk-order{ grid-area: order; }
.blk-order{ margin-top: 0; }

.chapters-heading{
  font-family: var(--font-title);
  font-weight:800;
  color:#ffffff;
  background: var(--blue);
  font-size: 1rem;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 6px;
  text-align:center;
  line-height:1.4;
}
.chapters-list{ list-style:none; margin:0; padding:0; counter-reset: chap; }
.chapters-list li{
  margin:0;
  padding:2px 0;
  counter-increment: chap;
  border-bottom:1px solid #e3e3e3;
}
.chapters-list li:last-child{ border-bottom:none; }
.chapter-link, .chapter-static{
  font-family: var(--font-title);
  font-weight:700;
  color: var(--blue);
  text-decoration:none;
  background:none; border:none; text-align:left;
  font-size: .9rem;
  line-height:1.35;
  display:flex;
  align-items:flex-start;
  gap:5px;
  width:calc(100% + 26px);
  margin-left:-13px;
  padding:9px 13px;
  border-radius:6px;
}
.chapter-link{
  cursor:pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
/* Rollover des chapitres non achetés : fond gris foncé */
.chapter-static{
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.chapter-static:hover{
  background-color:#4b515d;
  color:#ffffff;
  box-shadow:0 4px 12px rgba(0,0,0,.3);
}
.chapter-static:hover .chap-sub{ color:#e8edf9; }
.chap-num{ flex:0 0 auto; }
.chap-text{ display:flex; flex-direction:column; }
.chap-sub{
  font-weight:300;
  font-size:.85em;
  color:#202020;
  line-height:1.25;
  margin-top:2px;
}
.chapter-link:hover .chap-sub,
.chapter-link.active .chap-sub{ color:#e8edf9; }
.chapter-link:hover{
  background-color:#0039a0;
  color:#ffffff;
  box-shadow:0 4px 12px rgba(0,0,0,.3);
}
/* Chapitre actif : fond vert, police blanche (au repos comme au survol) */
.chapter-link.active,
.chapter-link.active:hover{
  background-color: var(--green);
  color:#ffffff;
}
.chapter-link.active:hover{ box-shadow:0 4px 12px rgba(0,0,0,.3); }
.chapter-link.active .chapter-playing-icon{
  color:#ffffff;
  border-color:#ffffff;
}
/* Icône "écran" à côté du chapitre en cours de lecture */
.chapter-playing-icon{
  margin-left:8px;
  color: var(--green-dark);
  border:1px solid var(--green-dark);
  border-radius:4px;
  padding:2px 5px;
  font-size:.75rem;
  vertical-align:1px;
}

/* Titre du chapitre en cours, sous le lecteur */
.now-playing{
  text-align:center;
  margin:12px 0 0;
  font-family: var(--font-title);
  font-weight:700;
  color: var(--green-dark);
  font-size:.95rem;
}
.now-duration[hidden]{ display:none; }  /* sinon display:flex écrase l'attribut hidden */
.now-duration{
  width:fit-content;
  margin:10px auto 0;
  display:flex;
  align-items:center;
  gap:8px;
  background: var(--green);
  color:#ffffff;
  font-family: var(--font-title);
  font-weight:400;
  font-size:.95rem;
  padding:7px 18px;
  border-radius:6px;
}

/* Lecteur vidéo */
.player-box{
  border:1px solid var(--border);
  border-radius: 6px;
  background:#fff;
  aspect-ratio: 16/10;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
  position:relative;
}
.player-box video{ width:100%; height:100%; object-fit:contain; background:#000; }

/* Gros bouton PLAY affiché quand la vidéo est en pause */
.play-overlay{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none;            /* laisse les contrôles natifs cliquables */
}
.play-overlay.is-hidden{ display:none; }
.play-big{
  pointer-events:auto;
  width:92px; height:92px;
  border:none; border-radius:50%;
  background:rgba(255,255,255,.78);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  box-shadow:0 4px 20px rgba(0,0,0,.3);
  transition:transform .15s ease, background .15s ease;
}
.play-big:hover{ transform:scale(1.07); background:rgba(255,255,255,.92); }
.play-big svg{ width:44px; height:44px; fill:#101010; margin-left:6px; }
.player-placeholder{ padding:24px; }
.player-placeholder .eyebrow{
  font-style:italic; color:#9aa0a6; font-family: var(--font-title); letter-spacing:1px;
}
.player-placeholder .big{
  font-family: var(--font-title); font-weight:800; color: var(--blue);
  font-size: clamp(1.6rem, 4vw, 2.4rem); margin:6px 0 12px;
}
.player-placeholder .small{ color: var(--black); font-weight:700; }

/* Bloc prix + commander */
.price-box{
  border:1px solid var(--border);
  border-radius:6px;
  text-align:center;
  padding:12px;
  font-family: var(--font-title);
  font-weight:700;
  color: var(--green-dark);
  margin-bottom:12px;
}
.price-box .price{ color: var(--green); font-size:1.3rem; }
.price-extra{ margin-top:4px; font-size:.92rem; font-weight:400; color: var(--green-dark); }
.price-extra p{ margin:0; }
.order-cta{ margin-top: 4px; }

/* Desktop : chapitres à gauche (col 1) ; lecteur + prix + bouton empilés à droite (col 2) */
@media (min-width: 860px){
  .formation-grid{
    grid-template-columns: 1fr 1fr;
    grid-template-areas: none;
    gap: 0 40px;
    align-items:start;
  }
  .formation-main{
    display:flex;
    flex-direction:column;
    gap:14px;
    grid-column: 2;          /* colonne de droite */
    grid-row: 1;
    position: sticky;        /* le lecteur suit le défilement */
    top: 80px;               /* sous la barre de navigation fixe */
    align-self: start;
  }
  .blk-chapters{
    grid-column: 1;          /* colonne de gauche */
    grid-row: 1;
    align-self:start;
  }
}

/* ---------------------------------------------------------------------
   PAGE À PROPOS — programme de la formation (SEO)
--------------------------------------------------------------------- */
.seo-chapters{ margin-top:34px; }
.seo-chapters-title{
  font-family: var(--font-title);
  color:#303030;
  text-align:center;
  font-size:1.25rem;
  margin:0 0 26px;
}
.seo-chapter{ margin:0 0 30px; }
.seo-chapter h3{
  font-family: var(--font-title);
  color: var(--blue);
  font-size:1.05rem;
  margin:0 0 8px;
  padding-bottom:8px;
  border-bottom:1px solid #e3e3e3;
}
.seo-chapter-sub{
  font-family: var(--font-body);
  font-weight:400;
  font-size:.85rem;
  color: var(--grey);
  margin-left:8px;
}

/* Titre H1 de la page formation : margin-top réduit de 20px (18px -> -2px) */
.formation-title{ margin-top:-2px; }

/* Bouton de commande fixe en bas — mobile uniquement */
.sticky-order{ display:none; }
@media (max-width: 859px){
  .sticky-order{
    display:block;
    position:fixed;
    left:0; right:0; bottom:0;
    z-index:60;
    text-align:center;
    background: var(--green);
    color:#ffffff;
    border-top:2px solid var(--green-dark);
    padding:14px 18px;
    font-family: var(--font-title);
    font-weight:400;
    font-size:1rem;
    line-height:1.25;
    text-decoration:none;
    box-shadow:0 -4px 16px rgba(0,0,0,.20);
    transition: transform .25s ease, opacity .25s ease;
  }
  .sticky-order.is-hidden{
    transform: translateY(115%);
    opacity:0;
    pointer-events:none;
  }
  .sticky-order p{ margin:0; }   /* le WYSIWYG enrobe parfois en <p> */
  /* espace pour ne pas masquer le bas de page sous le bouton fixe */
  body.has-sticky-cta{ padding-bottom:86px; }
}

/* Partenaires en bas de la page formation */
.formation-partners{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-evenly;
  align-items:flex-start;
  gap:30px;
  margin-top:50px;
}
.partner-link{ display:inline-block; line-height:0; }
.partner-link img{
  width:250px;
  height:auto;
  border:1px solid #adadad;
  border-radius:8px;
  transition: box-shadow .2s ease;
}
.partner-link:hover img{
  box-shadow:0 6px 22px rgba(0,0,0,.18);
}

/* ---------------------------------------------------------------------
   FORMULAIRES
--------------------------------------------------------------------- */
.form-card{
  background:#fff;
}
label{
  display:block;
  font-family: var(--font-title);
  font-weight:600;
  margin: 18px 0 6px;
  color: var(--black);
}
input[type=text],
input[type=email],
input[type=tel],
input[type=password],
input[type=number],
textarea,
select{
  width:100%;
  padding:12px 14px;
  border:1px solid #b9c2d6;
  border-radius:6px;
  font-size:1rem;
  font-family: var(--font-body);
  background:#fff;
}
input:focus, textarea:focus, select:focus{
  outline:none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1,60,167,.15);
}
textarea{ min-height:120px; resize:vertical; }
.field-hint{ font-size:.85rem; color: var(--grey); margin:4px 0 0; }

/* champ avec icône œil */
.input-eye{ position:relative; }
.input-eye input{ padding-right:46px; }
.eye-toggle{
  position:absolute; top:50%; right:8px; transform:translateY(-50%);
  width:34px; height:34px; border:none; background:transparent; cursor:pointer;
  background-repeat:no-repeat; background-position:center;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.eye-toggle.is-off{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

/* Choix paiement */
.pay-methods{ margin-top: 26px; }
.pay-methods h3{ font-family:var(--font-title); text-transform:uppercase; font-size:.95rem; border-bottom:2px solid var(--black); display:inline-block; padding-bottom:2px; }
.pay-option{
  display:flex; gap:12px; align-items:flex-start;
  border:1px solid var(--border); border-radius:6px; padding:14px; margin-top:12px;
  cursor:pointer;
}
.pay-option.selected{ border-color: var(--blue); background:#f4f7fe; }
.pay-option input{ width:auto; margin-top:4px; }
.pay-logos{ display:flex; gap:8px; align-items:center; margin-left:auto; }
.pay-logos img{ height:26px; }
.iban-block{ font-size:.95rem; margin-top:8px; display:none; }
.iban-block.show{ display:block; }
.pay-price{ display:none; margin-top:6px; color: var(--green-dark); font-weight:600; }
.pay-option.selected .pay-price{ display:block; }

/* messages */
.alert{
  border-radius:6px; padding:12px 16px; margin: 0 0 18px; font-weight:600;
}
.alert-error{ background:#fdecec; color: var(--red); border:1px solid #f5c2c2; }
.alert-success{ background:#e9f7e9; color: var(--green-dark); border:1px solid #bfe6bf; }
.alert-info{ background:#eef3fd; color: var(--blue); border:1px solid #c8d8f5; }
.iban-recap{
  margin-top:20px;
  padding:12px 14px;
  background:#fff;
  border:1px solid #c8d8f5;
  border-radius:6px;
  font-weight:400;
  color: var(--black);
  text-align:left;
  display:inline-block;
}
.iban-recap-intro{
  margin:0 0 10px;
  font-weight:700;
  color: var(--blue);
}

.steps{ background: var(--grey-light); border-radius:8px; padding:18px 20px; margin-bottom:24px; }
.steps h2{ font-family:var(--font-title); font-size:1.05rem; margin:0 0 8px; }
.steps p{ margin:2px 0; font-size:.97rem; }

/* ---------------------------------------------------------------------
   MODALE
--------------------------------------------------------------------- */
.modal{ position:fixed; inset:0; z-index:100; display:none; }
.modal.open{ display:block; }
.modal-overlay{ position:absolute; inset:0; background:rgba(16,16,16,.55); }
.modal-box{
  position:relative;
  background:#fff;
  max-width: 460px;
  margin: 6vh auto;
  max-height: 88vh;
  overflow:auto;
  border-radius:12px;
  padding: 28px 26px 30px;
  box-shadow:0 18px 50px rgba(0,0,0,.35);
  animation: pop .18s ease;
}
.modal-sep{ border:none; border-top:1px solid var(--border); margin:18px 0 16px; }

/* Modale "Mon compte" : version compacte (tient sur un écran mobile) */
#account-modal .modal-box{ padding:18px 20px 20px; margin:3vh auto; }
#account-modal .modal-title{ margin:0 0 12px; font-size:1.2rem; }
#account-modal label{ margin:9px 0 3px; font-size:.88rem; }
#account-modal input{ padding:8px 11px; font-size:.95rem; }
#account-modal .field-hint{ font-size:.76rem; margin-top:2px; }
#account-modal .btn-block.mt-3{ margin-top:12px; padding:11px; }
#account-modal .modal-sep{ margin:12px 0 10px; }
#account-modal .btn-logout{ padding:11px; }
#account-modal .btn-fermer{ margin-top:12px; }
.form-row{ display:flex; gap:12px; }
.form-row .form-col{ flex:1; min-width:0; }
@keyframes pop{ from{ transform:translateY(12px); opacity:0;} to{ transform:none; opacity:1;} }
.modal-title{ font-family:var(--font-title); color:var(--blue); margin:0 0 18px; text-align:center; }
.modal-close{
  position:absolute; top:10px; right:14px; border:none; background:none;
  font-size:1.8rem; line-height:1; color:#888; cursor:pointer;
}
.modal-error{ background:#fdecec; color:var(--red); border:1px solid #f5c2c2; border-radius:6px; padding:10px 12px; margin-bottom:14px; font-weight:600; font-size:.95rem; }
.forgot-link{ text-align:center; margin:16px 0 0; font-size:.9rem; }
.forgot-link a{ color: var(--grey); }
.forgot-link a:hover{ color: var(--blue); }
.modal-body{ font-size:1rem; }
.modal-body h3{ font-family:var(--font-title); color:var(--blue); margin-top:0; }

/* Modale chapitre (formation non achetée) */
.modal-chapitre{
  max-width: 695px;          /* image 643px + 26px de padding de chaque côté */
  width: 92%;
}
.modal-banner{
  display:block;
  width:100%;
  border-radius:8px;
  margin-top:10px;   /* évite le chevauchement avec la croix de fermeture */
}
.modal-chap-title{
  font-family: var(--font-title);
  color: var(--blue);
  font-weight:800;
  font-size:calc(1.35rem - 3px);
  line-height:1.3;
  margin:30px 0 12px;
}
.modal-chap-sep{
  border:none;
  border-top:1px solid #e3e3e3;
  margin:0 0 16px;
}
.modal-chap-desc{
  font-size:calc(1rem - 2px);
  line-height:1.45;
  margin:0 0 6px;
}
.modal-chap-sep-bottom{ margin:16px 0 0; }
.modal-chapitre .btn-fermer{ margin-top:25px; }
@media (max-width: 580px){
  .modal-chapitre{ width: calc(100% - 24px); padding: 18px 16px 22px; }
  .modal-chapitre .modal-banner{ margin-top:28px; } /* dégage la croix de fermeture */
  .modal-chap-title{ font-size:1.15rem; margin-top:14px; }
}
.btn-fermer{
  display:block;
  margin:22px auto 0;
  background-color: var(--blue);
  color:#efefef;
  border:none;
  border-radius:6px;
  padding:8px 22px;
  font-family:var(--font-title);
  font-weight:400;
  font-size:.72rem;
  cursor:pointer;
  transition:filter .15s ease;
}
.btn-fermer:hover{ filter:brightness(1.25); }

/* ---------------------------------------------------------------------
   PAGES SUCCESS / FAILED
--------------------------------------------------------------------- */
.result-page{ text-align:center; }
.result-page .section-title{ margin-top:24px; }
.result-page p{ max-width:640px; margin:0 auto 16px; }
.result-actions{ margin-top:28px; }

/* ---------------------------------------------------------------------
   FOOTER
--------------------------------------------------------------------- */
.site-footer{
  flex-shrink:0;
  background: var(--black);
  color:#cfd3da;
  font-size:.9rem;
}
.footer-inner{
  max-width:var(--maxw); margin:0 auto; padding:18px;
  display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap;
}
.site-footer a{ color:#cfd3da; }
.footer-sep{ opacity:.5; }

/* ---------------------------------------------------------------------
   UTILITAIRES
--------------------------------------------------------------------- */
.text-center{ text-align:center; }
.mt-0{ margin-top:0; } .mt-2{ margin-top:18px; } .mt-3{ margin-top:28px; }
.hidden{ display:none !important; }
