/* ============================================
   index.css — Page d'accueil P² Prépas Polytech
   Police : Playfair Display (display) + Montserrat (corps)
   Palette : Black · Orange · Crème · White
============================================ */

/* ─── VARIABLES ──────────────────────────────── */
:root {
  --black:   #0b0b0b;
  --white:   #ffffff;
  --orange:  #ff6a00;
  --yellow:  #ffd400;
  --creme:   #FFF8F0;
  --muted:   #bfc7c9;
  --dark2:   #111416;
  --dark3:   #14181a;

  --color-ingenierie:     #ff6a00;
  --color-sante:          #e00000;
  --color-gestion:        #7c3aed;
  --color-education:      #1d6ec2;
  --color-administration: #eb8e2a;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Montserrat', Arial, sans-serif;

  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-card: 0 12px 48px rgba(0,0,0,.15);
}

/* ─── RESET ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { font-size: 62.5%; scroll-behavior: smooth }
body {
  font-family: var(--font-body);
  background: var(--creme);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a  { color: inherit; text-decoration: none }
img { display: block; max-width: 100% }

/* ─── LAYOUT ─────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ─── TYPOGRAPHY SHARED ──────────────────────── */
h2 {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.01em;
}
h2 em { font-style: italic; color: var(--orange) }

/* Badges/pills */
.label-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.15rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--orange);
  border: 1.5px solid rgba(255,106,0,.35);
  padding: .4rem 1.2rem; border-radius: 99px;
  margin-bottom: 1.6rem;
}
.label-pill--dark {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--orange); color: #000;
  padding: 1.2rem 2.6rem; border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.4rem; font-weight: 800;
  border: none; cursor: pointer;
  transition: background .2s, transform .18s, box-shadow .2s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary:hover {
  background: #e85d00;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,106,0,.35);
}

/* ─── NAVBAR ─────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 7rem;
  background: var(--black);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3.8rem;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(11,11,11,.96);
  backdrop-filter: blur(14px);
}
.logo {
  font-family: var(--font-body);
  font-weight: 900; font-size: 2.2rem;
  color: var(--white); letter-spacing: -.02em;
  white-space: nowrap;
}
.logo span { color: var(--orange) }

.nav-links {
  display: flex; align-items: center; gap: 1.8rem;
}
.nav-link {
  font-size: 1.35rem; font-weight: 600;
  color: rgba(255,255,255,.75);
  padding: .5rem .7rem; border-radius: 7px;
  transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--yellow) }
.btn-cta {
  background: var(--orange); color: #000 !important;
  padding: .75rem 1.6rem; border-radius: 9px;
  font-weight: 800; font-size: 1.35rem;
  transition: background .2s, transform .18s;
}
.btn-cta:hover { background: #e85d00; transform: translateY(-1px) }

.burger {
  display: none; flex-direction: column;
  gap: .5rem; background: none; border: none;
  cursor: pointer; padding: .4rem;
}
.burger span {
  display: block; width: 2.4rem; height: .25rem;
  background: var(--white); border-radius: 99px;
  transition: all .3s;
}
.burger.open span:nth-child(1) { transform: translateY(.75rem) rotate(45deg) }
.burger.open span:nth-child(2) { opacity: 0 }
.burger.open span:nth-child(3) { transform: translateY(-.75rem) rotate(-45deg) }


/* ─── HERO ───────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh; min-height: 65rem;
  display: flex; align-items: flex-end;
  padding-bottom: 8rem;
  overflow: hidden;
}

/* Slides */
.hero-slides { position: absolute; inset: 0 }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease, transform 9s ease;
  transform: scale(1.07);
}
.hero-slide.active { opacity: 1; transform: scale(1) }

/* Filtre fumé multicouche */
.hero-fog {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to right, rgba(0,0,0,.75) 0%, rgba(0,0,0,.3) 60%, rgba(0,0,0,.1) 100%),
    linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 50%, rgba(0,0,0,.5) 100%);
}
/* Grain subtil */
.hero-grain {
  position: absolute; inset: 0; z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; opacity: .5;
}

.hero-content {
  position: relative; z-index: 3;
  padding: 0 6%;
  max-width: 820px;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 1rem;
  font-size: 1.2rem; font-weight: 700;
  color: rgba(255,255,255,.55);
  text-transform: uppercase; letter-spacing: .16em;
  margin-bottom: 2rem;
  animation: fadeUp .8s ease both;
}
.ey-dot {
  width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--orange); flex-shrink: 0;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 6rem; font-weight: 900;
  color: var(--white); line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 2.4rem;
  animation: fadeUp .8s .12s ease both;
}
.hero-brand {
  display: block;
  font-style: italic;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-lead {
  font-size: 1.65rem; font-weight: 500; line-height: 1.75;
  color: rgba(255,255,255,.72);
  max-width: 600px;
  margin-bottom: 3.2rem;
  animation: fadeUp .8s .24s ease both;
}
.hero-lead strong { color: var(--white) }

.hero-ctas {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  margin-bottom: 4rem;
  animation: fadeUp .8s .36s ease both;
}
.btn-ghost {
  display: inline-flex; align-items: center;
  background: transparent;
  border: 2px solid rgba(255,255,255,.35);
  color: var(--white);
  padding: 1.2rem 2.6rem; border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.4rem; font-weight: 700;
  cursor: pointer; transition: border-color .2s, background .2s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.8); background: rgba(255,255,255,.06) }

/* Stats hero */
.hero-stats {
  display: inline-flex; align-items: center; gap: 2.4rem;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 1.6rem 2.8rem;
  animation: fadeUp .8s .48s ease both;
}
.hstat { text-align: center }
.hstat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 900; color: var(--white);
  line-height: 1;
}
.hstat strong sup { font-size: 1.6rem; color: var(--orange); vertical-align: super }
.hstat span {
  display: block; font-size: 1.1rem; font-weight: 600;
  color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .08em;
  margin-top: .4rem;
}
.hstat-sep { width: 1px; height: 4rem; background: rgba(255,255,255,.12) }

/* Dots diaporama */
.slide-dots {
  position: absolute; bottom: 3.4rem; left: 50%; transform: translateX(-50%);
  z-index: 4; display: flex; gap: .8rem;
}
.sdot {
  width: 2.8rem; height: .35rem; border-radius: 99px;
  background: rgba(255,255,255,.3); border: none; cursor: pointer; padding: 0;
  transition: background .3s, width .3s;
}
.sdot.active { width: 5rem; background: var(--orange) }
.sdot:hover:not(.active) { background: rgba(255,255,255,.55) }

/* Flèche scroll */
.scroll-hint {
  position: absolute; right: 3.6rem; bottom: 3rem; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  color: rgba(255,255,255,.35); font-size: 1.2rem; font-weight: 700;
  text-decoration: none;
  animation: scrollPulse 2.2s ease infinite;
}
.scroll-line {
  display: block; width: 1px; height: 4rem;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.4));
}
.scroll-arrow { font-size: 1.4rem }
@keyframes scrollPulse {
  0%,100% { opacity: .35; transform: translateY(0) }
  50% { opacity: .7; transform: translateY(5px) }
}


/* ─── SECTION À PROPOS ───────────────────────── */
.section-about {
  background: var(--creme);
  padding: 10rem 0;
}
.section-about .container {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8rem; align-items: center;
}
.about-img-wrap {
  position: relative;
}
.about-img {
  width: 100%; border-radius: var(--radius-lg);
  object-fit: cover; aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
}
.about-float-badge {
  position: absolute; bottom: -2.6rem; right: -2.6rem;
  background: var(--black);
  color: var(--white);
  padding: 1.6rem 2.2rem;
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 1.4rem;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
  font-size: 1.4rem;
}
.about-float-badge span { font-size: 3rem }
.about-float-badge strong { display: block; font-size: 1.5rem }
.about-float-badge small { color: var(--orange); font-weight: 700 }

.about-text h2 { margin-bottom: 2rem }
.about-lead {
  font-size: 1.55rem; font-weight: 500; line-height: 1.8;
  color: #333; margin-bottom: 1.4rem;
}
.about-text p { font-size: 1.45rem; color: #555; line-height: 1.8; margin-bottom: 2.4rem }
.about-checks {
  list-style: none;
  display: flex; flex-direction: column; gap: 1.1rem;
  margin-bottom: 3.2rem;
}
.about-checks li {
  display: flex; align-items: flex-start; gap: 1rem;
  font-size: 1.45rem; color: #333; font-weight: 500;
}
.ck {
  width: 2.2rem; height: 2.2rem; flex-shrink: 0;
  background: var(--orange); color: #000;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900; margin-top: .1rem;
}


/* ─── SECTION PROGRAMMES ─────────────────────── */
.section-programmes {
  background: var(--dark2);
  padding: 10rem 0 0;
}
.sec-head {
  text-align: center; margin-bottom: 5.6rem;
}
.sec-head h2 { color: var(--white); margin-bottom: 1.4rem }
.sec-head p {
  font-size: 1.6rem; color: rgba(255,255,255,.45);
  max-width: 560px; margin: 0 auto; line-height: 1.7;
}

/* Grille programmes */
.prog-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem;
}
.prog-card {
  background: #1a1e21;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2.4rem;
  display: flex; flex-direction: column; gap: 1.1rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.prog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.prog-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--c); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.prog-card--cta {
  background: linear-gradient(135deg, #1a1200, #120d00);
  border-color: rgba(255,106,0,.15);
}
.prog-icon { font-size: 3rem }
.prog-card h3 {
  font-size: 1.85rem; font-weight: 800;
  color: var(--white); line-height: 1.2;
}
.prog-card p {
  font-size: 1.35rem; color: rgba(255,255,255,.45);
  line-height: 1.7; flex: 1;
}
.prog-pills {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: .4rem;
}
.prog-pills span {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.55);
  padding: .3rem 1rem; border-radius: 5px;
  font-size: 1.15rem; font-weight: 700;
}
.prog-link {
  display: inline-flex; align-items: center;
  color: var(--c); font-size: 1.3rem; font-weight: 700;
  margin-top: auto; padding-top: .8rem;
  transition: letter-spacing .2s;
}
.prog-link:hover { letter-spacing: .04em }


/* ─── BANDEAU LIVRES ─────────────────────────── */
.livres-banner {
  margin-top: 7rem;
  padding: 3rem 0 3.4rem;
  background: #0d1012;
  border-top: 1px solid rgba(255,255,255,.04);
  overflow: hidden; position: relative;
}
.livres-label {
  text-align: center;
  font-size: 1.2rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .18em;
  color: rgba(255,255,255,.25);
  margin-bottom: 2.2rem;
}
.livres-track-outer {
  overflow: hidden; position: relative;
}
/* Estompage bords */
.livres-track-outer::before,
.livres-track-outer::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 10rem;
  z-index: 2; pointer-events: none;
}
.livres-track-outer::before { left:  0; background: linear-gradient(to right, #0d1012, transparent) }
.livres-track-outer::after  { right: 0; background: linear-gradient(to left,  #0d1012, transparent) }

.livres-track {
  display: flex; gap: 2rem;
  width: max-content;
  animation: scrollLivres 32s linear infinite;
}
.livres-track:hover { animation-play-state: paused }

/* Livre 3D */
.livre {
  flex-shrink: 0;
  width: 12rem; height: 17rem;
  border-radius: 2px 10px 10px 2px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  display: flex;
  box-shadow: 4px 8px 24px rgba(0,0,0,.5);
  transition: transform .3s, box-shadow .3s;
  cursor: default; overflow: hidden;
}
.livre:hover {
  transform: translateY(-8px) rotate(-1.5deg);
  box-shadow: 8px 18px 40px rgba(0,0,0,.6);
}
.l-tranche {
  width: 1.4rem; flex-shrink: 0;
  background: rgba(0,0,0,.3);
  border-right: 1px solid rgba(255,255,255,.1);
}
.l-plat {
  flex: 1; padding: 1.4rem 1rem;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.l-plat b {
  display: block;
  font-size: 1.25rem; font-weight: 900;
  color: rgba(255,255,255,.92);
  line-height: 1.2; margin-bottom: .5rem;
}
.l-plat small {
  font-size: .95rem; font-weight: 600;
  color: rgba(255,255,255,.5);
}


/* ─── SECTION CONTACT ────────────────────────── */
.section-contact {
  background: var(--creme);
  padding: 10rem 0;
}
.section-contact .container {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 6rem; align-items: start;
}
.contact-infos h2 { color: var(--creme); margin-bottom: 1.6rem }
.contact-lead {
  font-size: 1.5rem; color: rgba(15, 15, 15, 0.45);
  line-height: 1.8; margin-bottom: 3.6rem;
}
.cinfo-list { display: flex; flex-direction: column; gap: 2.2rem }
.cinfo-item {
  display: flex; align-items: flex-start; gap: 1.8rem;
}
.cinfo-icon {
  font-size: 2.2rem; flex-shrink: 0; margin-top: .3rem;
  width: 4.4rem; height: 4.4rem; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border-radius: 10px;
}
.cinfo-item div { display: flex; flex-direction: column; gap: .4rem }
.cinfo-item strong {
  font-size: 1.2rem; font-weight: 800; color: rgba(255,255,255,.35);
  text-transform: uppercase; letter-spacing: .1em;
}
.cinfo-item span, .cinfo-item a {
  font-size: 1.4rem; color: #333333; font-weight: 500; line-height: 1.6;
}
.cinfo-item a:hover { color: var(--orange) }

/* Boîte formulaire */
.contact-form-box {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 22px;
  padding: 4rem;
  position: relative; overflow: hidden;
}
.form-title {
  font-family: var(--font-display);
  font-size: 2.4rem; color: var(--black); font-weight: 700;
  margin-bottom: 2.8rem;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem }
.field { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.6rem }
.field label {
  font-size: 1.2rem; font-weight: 800;
  color: #333333;
  text-transform: uppercase; letter-spacing: .1em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  color: #333333;
  font-family: var(--font-body); font-size: 1.4rem;
  outline: none; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.field select { cursor: pointer }
.field input::placeholder, .field textarea::placeholder { color: rgba(6, 6, 6, 0.18) }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,106,0,.13);
}
.btn-submit {
  width: 100%; padding: 1.5rem;
  background: var(--orange); color: #000;
  border: none; border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1.5rem; font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .18s, box-shadow .2s;
}
.btn-submit:hover {
  background: #e85d00;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255,106,0,.3);
}
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none }

/* Overlay succès */
.form-success-msg {
  display: none;
  position: absolute; inset: 0;
  background: #1a1e21;
  border-radius: 22px;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.2rem; padding: 4rem;
  z-index: 10;
}
.form-success-msg.visible { display: flex }
.fs-icon { font-size: 5rem }
.form-success-msg strong { font-size: 2.2rem; color: var(--white) }
.form-success-msg p { font-size: 1.4rem; color: rgba(255,255,255,.5); line-height: 1.7 }


/* ─── FOOTER ─────────────────────────────────── */
footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 5.5rem 5% 3.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1.2fr 1.6fr; gap: 4rem;
}
.footer-logo {
  font-size: 2.2rem; font-weight: 900;
  color: var(--white); margin-bottom: .9rem;
}
.footer-logo span { color: var(--orange) }
.footer-brand p {
  font-size: 1.35rem; color: rgba(255,255,255,.3);
  font-style: italic; line-height: 1.6;
}
.footer-col { display: flex; flex-direction: column; gap: .9rem }
.footer-col h4 {
  font-size: 1.15rem; font-weight: 800;
  color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: .5rem;
}
.footer-col a, .footer-col span {
  font-size: 1.35rem; color: rgba(255,255,255,.5);
  transition: color .2s;
}
.footer-col a:hover { color: var(--orange) }
.footer-bottom {
  max-width: 1180px; margin: 0 auto;
  padding: 2rem 5%;
  border-top: 1px solid rgba(255,255,255,.04);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 1.2rem; color: rgba(255,255,255,.2);
}


/* ─── ANIMATIONS ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px) }
  to   { opacity: 1; transform: translateY(0) }
}
@keyframes scrollLivres {
  from { transform: translateX(0) }
  to   { transform: translateX(-50%) }
}

/* Scroll reveal */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0) }


/* ─── RESPONSIVENESS ─────────────────────────── */
@media (max-width: 1100px) {
  .prog-grid { grid-template-columns: repeat(2,1fr) }
  .footer-inner { grid-template-columns: 1fr 1fr }
}
@media (max-width: 900px) {
  .nav-links { display: none }
  .burger { display: flex }
  /* Mobile nav ouvert */
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: fixed; top: 7rem; left: 0; right: 0; bottom: 0;
    background: rgba(11,11,11,.98); backdrop-filter: blur(12px);
    padding: 3rem 4rem; gap: 1.8rem;
    z-index: 999;
  }
  .nav-links.open .nav-link { font-size: 2rem }
  .nav-links.open .btn-cta { font-size: 2rem; padding: 1rem 2rem }

  .hero-title { font-size: 4rem }
  .hero-stats { display: none }

  .section-about .container { grid-template-columns: 1fr; gap: 5rem }
  .about-img-wrap { max-width: 48rem; margin: 0 auto }
  .about-float-badge { right: -1rem; bottom: -2rem }

  .prog-grid { grid-template-columns: 1fr }
  .section-contact .container { grid-template-columns: 1fr }
  .footer-inner { grid-template-columns: 1fr 1fr }
}
@media (max-width: 600px) {
  html { font-size: 56% }
  .hero-title { font-size: 3.2rem }
  .hero-lead { font-size: 1.5rem }
  h2 { font-size: 3.2rem }
  .form-row-2 { grid-template-columns: 1fr }
  .contact-form-box { padding: 2.4rem 2rem }
  .footer-inner { grid-template-columns: 1fr }
  .scroll-hint { display: none }
}
