/* ====================================================================
   PsychoPedia Formations — Calendrier des formations 2026-2027
   Charte alignée sur l'explorateur : coral #E8725A · navy #1E3A5F
   crème #FAF6F1 · Poppins
   ==================================================================== */

:root {
  --coral: #E8725A;
  --coral-dark: #D35A42;
  --navy: #1E3A5F;
  --navy-deep: #152B47;
  --cream: #FAF6F1;
  --cream-2: #F3ECE3;
  --ink: #233145;
  --muted: #6C7A8C;
  --line: rgba(30, 58, 95, .12);

  /* Couleurs de cycle */
  --c-psychopedagogie: #E8725A;
  --c-psychologues: #1E3A5F;

  --shadow: 0 20px 46px -24px rgba(30, 58, 95, .35);
  --shadow-sm: 0 8px 22px -14px rgba(30, 58, 95, .3);
  --r: 18px;
  --maxw: 1160px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 10px;
}
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.sec-head p { color: var(--muted); margin-top: 8px; }

/* ---------- Header façon site principal (Wix) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: #fff;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 40px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 54px; height: 54px; border-radius: 50%; background: #fff; padding: 2px; box-shadow: var(--shadow-sm); }
.brand-name {
  font-family: 'Glacial Indifference', 'Poppins', system-ui, sans-serif;
  font-weight: 400; color: var(--navy); font-size: 1.5rem; letter-spacing: .01em;
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.login-link { font-weight: 600; font-size: .92rem; color: var(--navy); transition: .2s; }
.login-link:hover { color: var(--coral); }

/* Burger (mobile) */
.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 6px;
}
.burger span { width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: .3s var(--ease); }
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Menu principal : barre #141D38 pleine largeur avec marges, comme sur le site */
.main-nav { background: #fff; padding: 0 40px 20px; }
.nav-list {
  list-style: none;
  display: flex; align-items: stretch; justify-content: space-between; flex-wrap: nowrap;
  margin: 0; padding: 0;
  background: #141D38;
}
.nav-list > li { position: relative; display: flex; }
.nav-list > li > a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 16px 15px;
  font-size: .9rem; font-weight: 500; color: #fff;
  white-space: nowrap; transition: .2s;
}
@media (min-width: 901px) and (max-width: 1240px) {
  .nav-list > li > a { padding: 15px 10px; font-size: .82rem; }
}
.nav-list > li > a:hover,
.nav-list > li:hover > a {
  background: var(--coral); color: #fff;
}
.nav-list > li > a.is-current {
  background: var(--coral); color: #fff; font-weight: 600;
}
.caret { font-size: .68rem; opacity: .75; transition: .25s var(--ease); }
.has-sub:hover .caret { transform: rotate(180deg); }

/* Sous-menus : panneaux #141D38 comme sur le site */
.sub-menu {
  list-style: none;
  position: absolute; top: 100%; left: 0;
  min-width: 260px;
  background: #141D38;
  padding: 6px 0;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .2s var(--ease);
  z-index: 90;
}
.sub-menu--right { left: auto; right: 0; }
.has-sub:hover .sub-menu,
.has-sub:focus-within .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sub-menu a {
  display: block; padding: 11px 20px;
  font-size: .9rem; font-weight: 500; color: #fff;
  text-align: center; transition: .18s;
}
.sub-menu a:hover { background: var(--coral); }

/* ---------- Hero : bandeau #141D38, titre coral, comme le site ---------- */
.hero {
  text-align: center; padding: 64px 0 54px;
  background: #141D38;
}
.hero .eyebrow { color: #fff; opacity: .85; }
.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem); font-weight: 700;
  color: var(--coral); letter-spacing: -.01em;
}
.hero-lead { color: rgba(255, 255, 255, .82); max-width: 640px; margin: 16px auto 32px; font-size: 1.02rem; }

.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.chip {
  --chip-c: var(--coral);
  display: inline-flex; align-items: center; gap: 8px;
  padding: .6em 1.3em; border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, .35); background: transparent;
  font-weight: 600; font-size: .89rem; color: #fff;
  transition: .22s var(--ease);
}
.chip:hover { border-color: var(--chip-c); background: rgba(255, 255, 255, .08); transform: translateY(-1px); }
.chip.is-active { background: var(--chip-c); border-color: var(--chip-c); color: #fff; }
.chip--psychopedagogie { --chip-c: var(--c-psychopedagogie); }
.chip--psychologues { --chip-c: var(--coral); }

/* ---------- Cartes cycles ---------- */
.cycles { padding: 34px 0 10px; }
.cycle-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cycle-card {
  border-radius: 22px; padding: 30px 32px; color: #fff;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  box-shadow: var(--shadow-sm);
}
.cycle-card.psychologues { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); }
.cycle-card::after {
  content: ""; position: absolute; right: -60px; bottom: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.cycle-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; position: relative; z-index: 2; }
.cycle-card p { color: rgba(255, 255, 255, .88); font-size: .92rem; margin-bottom: 20px; position: relative; z-index: 2; }
.cycle-card .btn-white {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.4em; border-radius: 100px;
  background: #fff; color: var(--navy);
  font-weight: 700; font-size: .88rem;
  transition: .25s var(--ease); position: relative; z-index: 2;
}
.cycle-card .btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .4); }

/* ---------- Section formations ---------- */
.formations-section { padding: 56px 0 30px; }

.formation-card {
  --cyc: var(--c-psychopedagogie);
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; margin-bottom: 28px;
  transition: .3s var(--ease);
  animation: cardIn .45s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.formation-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.formation-card[data-cycle="psychologues"] { --cyc: var(--c-psychologues); }

.formation-header {
  display: grid; grid-template-columns: 300px 1fr; gap: 0;
}
.formation-media { position: relative; min-height: 210px; background: var(--cream-2); }
.formation-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.formation-media .cycle-badge {
  position: absolute; top: 14px; left: 14px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .4em .9em; border-radius: 100px;
  background: var(--cyc); color: #fff;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35);
}
.formation-info { padding: 24px 28px 20px; display: flex; flex-direction: column; }
.formation-title { font-size: 1.25rem; font-weight: 800; color: var(--navy); line-height: 1.3; }
.formation-subtitle { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.formation-meta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: auto; padding-top: 16px;
  font-size: .85rem; font-weight: 600; color: var(--navy);
}
.formation-meta .m { display: inline-flex; align-items: center; gap: 6px; }
.formation-meta .m span { color: var(--coral); }
.formation-price {
  margin-left: auto;
  font-size: 1.3rem; font-weight: 800; color: var(--coral);
}

/* Sessions */
.sessions-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 6px 28px 20px;
}
.session-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; position: relative;
  border-left: 4px solid var(--cyc);
  transition: .2s var(--ease);
}
.session-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.session-next {
  position: absolute; top: -9px; right: 12px;
  font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--coral); color: #fff;
  padding: .3em .8em; border-radius: 100px;
}
.session-formule { font-weight: 700; color: var(--navy); font-size: .9rem; }
.session-format { font-size: .76rem; font-weight: 600; color: var(--cyc); margin: 3px 0 6px; }
.session-dates { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.no-sessions {
  margin: 0 28px 20px; padding: 16px 20px;
  background: var(--cream); border: 1px dashed var(--line); border-radius: 14px;
  color: var(--muted); font-size: .9rem; text-align: center;
}

/* Actions */
.formation-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 0 28px 24px;
}
.btn-main, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .75em 1.5em; border-radius: 100px;
  font-weight: 700; font-size: .89rem;
  transition: .25s var(--ease);
}
.btn-main { background: var(--coral); color: #fff; }
.btn-main:hover { background: var(--coral-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy); background: var(--cream); }

/* ---------- Modalités ---------- */
.how-it-works { padding: 50px 0; background: var(--cream-2); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; text-align: center; position: relative;
}
.how-card.featured { background: var(--navy); border-color: transparent; }
.how-card.featured h3 { color: #fff; }
.how-card.featured p { color: rgba(255, 255, 255, .78); }
.how-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  background: var(--coral); color: #fff;
  padding: .4em 1em; border-radius: 100px; white-space: nowrap;
}
.how-ic {
  width: 52px; height: 52px; border-radius: 15px;
  background: rgba(232, 114, 90, .12); color: var(--coral);
  display: grid; place-items: center; font-size: 1.4rem;
  margin: 0 auto 16px;
}
.how-card.featured .how-ic { background: rgba(255, 255, 255, .12); color: #fff; }
.how-card h3 { font-size: 1.12rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.how-card p { color: var(--muted); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-section {
  padding: 64px 0; text-align: center;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  color: #fff;
}
.contact-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.contact-section p { max-width: 520px; margin: 0 auto 26px; color: rgba(255, 255, 255, .9); }
.btn-cta {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .9em 1.9em; border-radius: 100px;
  background: #fff; color: var(--coral-dark);
  font-weight: 700; transition: .25s var(--ease);
}
.btn-cta:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep); color: rgba(255, 255, 255, .7);
  text-align: center; padding: 44px 0 30px; font-size: .9rem;
}
.site-footer strong { color: #fff; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: var(--coral); }
.footer-links { margin: 12px 0; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-links span { color: rgba(255, 255, 255, .3); }
.footer-copyright { margin-top: 14px; font-size: .8rem; color: rgba(255, 255, 255, .45); }

/* ---------- Focus ---------- */
.chip:focus-visible, .pill:focus-visible, .btn-main:focus-visible,
.btn-ghost:focus-visible, .btn-cta:focus-visible, .btn-white:focus-visible {
  outline: 3px solid rgba(232, 114, 90, .5); outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cycle-cards { grid-template-columns: 1fr; }
  .sessions-list { grid-template-columns: 1fr 1fr; }
  .formation-header { grid-template-columns: 240px 1fr; }
}
@media (max-width: 900px) {
  .burger { display: flex; }
  .topbar { padding: 12px 18px; }

  /* Panneau blanc plein écran, items centrés, comme le menu Wix natif */
  .main-nav {
    display: none;
    position: fixed; top: 78px; left: 0; right: 0; bottom: 0;
    background: #fff; padding: 28px 0 60px;
    overflow-y: auto; z-index: 70;
  }
  .main-nav.is-open { display: block; }
  .nav-list {
    flex-direction: column; align-items: stretch;
    background: transparent; padding: 0;
  }
  .nav-list > li { display: block; }
  .nav-list > li > a {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 21px 24px;
    font-size: 1.3rem; font-weight: 500; color: var(--ink);
    border: none; background: none;
  }
  .nav-list > li > a:hover,
  .nav-list > li:hover > a { background: none; color: var(--coral); }
  .nav-list > li > a.is-current { background: none; color: var(--coral); font-weight: 600; }

  /* Chevron à gauche du libellé, comme sur le site */
  .has-sub > a { flex-direction: row-reverse; }
  .caret { font-size: .95rem; opacity: .8; color: var(--ink); }

  /* Sous-menus : liste blanche centrée, plus discrète */
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: #fff;
    margin: 0; padding: 0 0 10px; display: none;
    min-width: 0;
  }
  .sub-menu a {
    text-align: center; padding: 12px 24px;
    font-size: 1.02rem; color: var(--muted);
  }
  .sub-menu a:hover { background: none; color: var(--coral); }
  .has-sub.is-open .sub-menu { display: block; }
  .has-sub.is-open .caret { transform: rotate(180deg); }
}
@media (max-width: 700px) {
  .topbar { padding: 12px 16px; }
  .brand-name { font-size: .95rem; }
  .formation-header { grid-template-columns: 1fr; }
  .formation-media { min-height: 170px; aspect-ratio: 16 / 8; }
  .sessions-list { grid-template-columns: 1fr; padding-inline: 20px; }
  .formation-info { padding: 20px; }
  .formation-actions { padding-inline: 20px; }
  .no-sessions { margin-inline: 20px; }
  .how-grid { grid-template-columns: 1fr; }
  .formation-price { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
