/* ── Reset & variables ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:   #1B3A6B;
  --gold:   #C8732A;
  --cream:  #F5EDD8;
  --white:  #FDFAF4;
  --bg:     #F0E8D3;
  --dark:   #1C1710;
  --gray:   #6B5E4A;
  --border: #D9CDBB;
  --success:#2E7D32;
  --error:  #C62828;
  --font-d: 'Playfair Display', Georgia, serif;
  --font-b: 'DM Sans', sans-serif;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(28,23,16,.12);
  --trans:  .22s cubic-bezier(.4,0,.2,1);
}
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-b); background: var(--white); color: var(--dark); line-height: 1.65; overflow-x: hidden; }
img  { max-width: 100%; display: block; }
a    { color: var(--gold); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--navy); }
h1,h2,h3,h4 { font-family: var(--font-d); font-weight: 700; color: var(--navy); line-height: 1.2; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.header { background: var(--navy); position: sticky; top: 0; z-index: 99; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.header-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 64px;
}
.logo { font-family: var(--font-d); font-size: 1.05rem; color: var(--cream); display: flex; align-items: center; gap: .65rem; line-height: 1.25; }
.logo:hover { color: var(--cream); }
.logo-img { height: 44px; width: auto; border-radius: 4px; flex-shrink: 0; object-fit: contain; }
.logo-img-hide { display: flex; }

nav a {
  color: rgba(245,237,216,.75); font-size: .87rem; font-weight: 500;
  letter-spacing: .04em; padding: .4rem .85rem; border-radius: 5px;
  transition: all var(--trans);
}
nav a:hover, nav a.on { color: var(--cream); background: rgba(255,255,255,.1); }
nav .cta { background: var(--gold); color: #fff !important; border-radius: 20px; padding: .4rem 1.1rem; }
nav .cta:hover { background: #b0641e !important; }

.lang { display: flex; gap: .2rem; }
.lang button {
  background: none; border: none; cursor: pointer;
  color: rgba(245,237,216,.5); font-size: .8rem; font-weight: 600;
  padding: .25rem .4rem; border-radius: 4px; transition: all var(--trans);
  display: inline-flex; align-items: center; gap: .25rem; line-height: 1;
}
.lang button.on, .lang button:hover { color: var(--cream); background: rgba(255,255,255,.12); }
.lang-mobile { display: none; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: .4rem; flex-shrink: 0; }
.burger i { display: block; width: 22px; height: 2px; background: var(--cream); border-radius: 2px; transition: all .22s; }
.burger.is-open i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open i:nth-child(2) { opacity: 0; }
.burger.is-open i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Loader traduction ───────────────────────────────────────────────────── */
#loader {
  display: none; position: fixed; inset: 0; background: rgba(27,58,107,.55);
  backdrop-filter: blur(3px); z-index: 9998; align-items: center; justify-content: center;
  gap: .75rem; color: var(--cream); font-family: var(--font-d); font-size: 1.1rem;
}
#loader.show { display: flex; }
.spin { width: 36px; height: 36px; border: 3px solid rgba(245,237,216,.25); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilitaires ─────────────────────────────────────────────────────────── */
.wrap  { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section.alt { background: var(--bg); }
.section-tag { display: inline-block; color: var(--gold); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .4rem; }
.section-title { font-size: clamp(1.8rem,3.5vw,2.6rem); margin-bottom: .75rem; }
.section-head   { margin-bottom: 3rem; }
.section-head.center { text-align: center; }
.section-head.center p { color: var(--gray); max-width: 520px; margin: 0 auto; }

.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .75rem 1.75rem; border-radius: 30px; font-weight: 600; font-size: .93rem; transition: all var(--trans); cursor: pointer; border: 2px solid transparent; text-decoration: none; }
.btn-primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-primary:hover { background: #b0641e; border-color: #b0641e; color: #fff; transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { background: #14306a; color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(245,237,216,.4); }
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); }
.btn-white { background: #fff; color: var(--gold); border-color: #fff; }
.btn-white:hover { background: var(--cream); color: var(--gold); }
.btn-group { display: flex; gap: .85rem; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all var(--trans); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { height: 200px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.card-body p  { color: var(--gray); font-size: .92rem; line-height: 1.6; }

.tag { display: inline-block; background: rgba(200,115,42,.12); color: var(--gold); border-radius: 20px; padding: .2rem .75rem; font-size: .75rem; font-weight: 700; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 88vh; background: linear-gradient(145deg, #0f2347 0%, var(--navy) 55%, #2a4f8a 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(200,115,42,.2) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(200,115,42,.15) 0%, transparent 45%);
}
/* Layout hero : illustration à gauche, texte à droite */
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 3.5rem;
  width: 100%; max-width: 1140px; padding: 3rem 1.5rem;
}
.hero-illus-wrap {
  flex: 0 0 auto;
  position: relative;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,.35));
  animation: heroFloat 4s ease-in-out infinite;
  transition: width .15s;
}
.hero-illustration {
  width: 100%; display: block;
}
/* Barre resize hero : positionnée sous l'image, dans le hero */
.hero-size-bar {
  border-radius: 0 0 8px 8px;
}
@keyframes heroFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.hero-content { flex: 1; min-width: 0; text-align: left; }
.hero-content .btn-group { justify-content: flex-start; }
.hero-tag { display: inline-block; background: rgba(200,115,42,.2); color: #f0c480; border: 1px solid rgba(200,115,42,.35); border-radius: 30px; padding: .3rem 1rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); color: var(--cream); line-height: 1.1; margin-bottom: 1rem; }
.hero h1 em { color: #f0c480; font-style: italic; }
.hero-content > p { font-size: 1.05rem; color: rgba(245,237,216,.75); max-width: 520px; margin: 0 0 2.5rem; }

/* ── Stats ───────────────────────────────────────────────────────────────── */
.stats { background: #162d58; padding: 3.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; text-align: center; }
.stat-n { font-family: var(--font-d); font-size: 3rem; font-weight: 700; color: var(--gold); line-height: 1; }
.stat-l { font-size: .78rem; color: rgba(245,237,216,.6); letter-spacing: .1em; text-transform: uppercase; margin-top: .35rem; }

/* ── Qui sommes-nous ────────────────────────────────────────────────────── */
.qsn-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3.5rem;
  align-items: center;
}
.qsn-text .section-title { margin-bottom: 1.25rem; }
.qsn-body p {
  color: var(--gray); font-size: .97rem; line-height: 1.8;
  margin-bottom: .9rem;
}
.qsn-body p:empty { display: none; }
.qsn-img-wrap { position: relative; }
.qsn-img {
  width: 100%; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(28,23,16,.15);
  object-fit: cover;
  display: block;
}
/* ── Barre resize image QSN (mode édition) ── */
.ec-size-bar {
  display: flex; align-items: center; gap: .6rem;
  background: rgba(27,58,107,.85); backdrop-filter: blur(4px);
  border-radius: 0 0 10px 10px; padding: .45rem .85rem;
  margin-top: -2px;
}
.ec-size-bar input[type=range] {
  flex: 1; -webkit-appearance: none; height: 4px;
  background: rgba(245,237,216,.3); border-radius: 4px; outline: none; cursor: pointer;
}
.ec-size-bar input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: #C8732A; cursor: pointer;
}
.ec-size-icon { color: rgba(245,237,216,.7); font-size: .85rem; flex-shrink: 0; }
.ec-size-val   { color: #f0c480; font-size: .75rem; font-weight: 700; white-space: nowrap; min-width: 36px; text-align: right; }

.qsn-img-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg); border: 2px dashed var(--border);
  border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .75rem;
  color: var(--gray); font-size: .88rem;
}
.qsn-img-placeholder span { font-size: 3rem; }

/* ── Professeurs ─────────────────────────────────────────────────────────── */
.teacher { text-align: center; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem 1.25rem; transition: all var(--trans); }
.teacher:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.teacher-av { width: 76px; height: 76px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; margin: 0 auto .9rem; border: 3px solid var(--border); }
.teacher h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.teacher p  { color: var(--gray); font-size: .83rem; margin-bottom: .5rem; }

/* ── Planning table ──────────────────────────────────────────────────────── */
.plan-table { width: 100%; border-collapse: collapse; }
.plan-table th { background: var(--navy); color: var(--cream); padding: .85rem 1.2rem; text-align: left; font-family: var(--font-d); font-size: .95rem; }
.plan-table td { padding: .85rem 1.2rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
.plan-table tr:nth-child(even) td { background: var(--bg); }
.plan-table tr:hover td { background: rgba(200,115,42,.07); }
.day-pill { display: inline-block; background: var(--navy); color: var(--cream); border-radius: 4px; padding: .18rem .6rem; font-size: .78rem; font-weight: 700; }

/* ── Formulaires ─────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--gray); letter-spacing: .06em; text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea {
  background: var(--white); border: 1.5px solid var(--border); border-radius: 6px;
  padding: .7rem 1rem; font-family: var(--font-b); font-size: .94rem; color: var(--dark);
  transition: border-color var(--trans); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.msg { padding: .9rem 1.1rem; border-radius: 6px; margin-bottom: 1.2rem; font-size: .92rem; }
.msg.ok  { background: #e8f5e9; border-left: 4px solid var(--success); color: var(--success); }
.msg.err { background: #ffebee; border-left: 4px solid var(--error); color: var(--error); }

/* ── Page hero ───────────────────────────────────────────────────────────── */
.page-head { background: var(--navy); padding: 3rem 0; text-align: center; }
.page-head h1 { color: var(--cream); font-size: clamp(1.9rem,4vw,3rem); }
.page-head p  { color: rgba(245,237,216,.65); margin-top: .5rem; }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact-row { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.contact-icon { width: 42px; height: 42px; background: rgba(200,115,42,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.contact-row h4 { font-size: .88rem; font-weight: 700; margin-bottom: .05rem; }
.contact-row p  { color: var(--gray); font-size: .88rem; line-height: 1.45; margin: 0; }

/* ── PDF / Média cards ───────────────────────────────────────────────────── */
.file-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; text-decoration: none; color: var(--dark); transition: all var(--trans);
}
.file-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(200,115,42,.12); transform: translateY(-1px); color: var(--dark); }
.file-icon { font-size: 2rem; flex-shrink: 0; }
.file-info { flex: 1; }
.file-info strong { display: block; font-size: .95rem; margin-bottom: .1rem; }
.file-info span   { font-size: .77rem; color: var(--gray); }
.file-dl { font-size: .8rem; font-weight: 700; color: var(--gold); white-space: nowrap; padding: .4rem .9rem; border: 1.5px solid var(--gold); border-radius: 20px; transition: all var(--trans); }
.file-card:hover .file-dl { background: var(--gold); color: #fff; }

/* ── CTA band ────────────────────────────────────────────────────────────── */
.cta { background: linear-gradient(135deg, var(--gold) 0%, #a85c1a 100%); padding: 5rem 0; text-align: center; }
.cta h2 { color: #fff; font-size: clamp(1.8rem,3vw,2.5rem); margin-bottom: .85rem; }
.cta > .wrap > p { color: rgba(255,255,255,.85); margin-bottom: 2rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { background: #111; color: rgba(255,255,255,.55); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-grid h3 { color: var(--cream); font-family: var(--font-d); font-size: 1.3rem; margin-bottom: .65rem; line-height: 1.3; }
.footer-grid h4 { color: var(--cream); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .85rem; }
.footer-grid p  { font-size: .88rem; line-height: 1.7; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-grid a  { color: rgba(255,255,255,.5); font-size: .87rem; transition: color var(--trans); }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; text-align: center; font-size: .82rem; }

/* ── Cours : barre d'édition ────────────────────────────────────────────── */
.cours-edit-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .75rem .25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  gap: .5rem;
}
.cours-drag-handle {
  cursor: grab; color: var(--gray); font-size: .9rem;
  padding: .2rem .3rem; user-select: none; opacity: .5;
  transition: opacity .15s;
}
.cours-drag-handle:hover { opacity: 1; }
.cours-ico-btn {
  display: flex; align-items: center; gap: .3rem;
  background: #fff; border: 1.5px solid var(--border); border-radius: 8px;
  padding: .3rem .6rem; cursor: pointer; transition: all .18s;
}
.cours-ico-btn:hover { border-color: var(--gold); background: rgba(200,115,42,.06); }
.cours-ico-hint { font-size: .7rem; color: var(--gray); }
.cours-del-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(200,115,42,.35); font-size: 1rem; padding: .25rem .4rem;
  border-radius: 4px; transition: all .15s; margin-left: auto;
}
.cours-del-btn:hover { color: #ef4444; background: #fee2e2; }

/* ── Fade-in animation ───────────────────────────────────────────────────── */
.fade { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.fade.in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1/-1; }
}
@media (max-width: 680px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  /* logo visible sur mobile aussi */
  .logo-img { height: 32px; }
  .qsn-grid { grid-template-columns: 1fr; gap: 2rem; }
  .qsn-img-wrap { order: -1; }
  /* Hero mobile : illustration masquée, texte centré */
  .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; padding: 2.5rem 1.25rem; }
  .hero-illus-wrap { display: none; }
  .hero-content { text-align: center; }
  .hero-content .btn-group { justify-content: center; }
  .hero-content > p { margin: 0 auto 2rem; }

  nav, .lang-desktop { display: none; }
  .burger { display: flex; }
  .lang-mobile { display: flex; border-top: 1px solid rgba(255,255,255,.12); margin-top: .75rem; padding-top: .75rem; justify-content: center; gap: .5rem; }

  nav.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-top, 64px); left: 0; right: 0;
    background: var(--navy); padding: 1.25rem 1.5rem 1.75rem;
    border-top: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 999; gap: .2rem;
  }
  nav.open a { padding: .75rem 1rem; font-size: .95rem; border-radius: 6px; }
  nav.open .cta { text-align: center; margin-top: .4rem; }
}
