/* =============================================
   Lycée Professionnel Paul Lapie — Lunéville
   Styles principaux
   ============================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bordeaux: #A51C30;
  --navy: #0A1128;
  --cream: #F9F9F9;
  --white: #FFFFFF;
  --line: rgba(10, 17, 40, .12);
  --ink: #0A1128;
  --muted: rgba(10, 17, 40, .60);
  --muted2: rgba(10, 17, 40, .50);
  --muted3: rgba(10, 17, 40, .40);
}

body {
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

/* TOPBAR */
.topbar {
  background: var(--navy);
  padding: 7px 48px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, .60);
}

.topbar a {
  color: rgba(255, 255, 255, .60);
  text-decoration: none;
  transition: color .15s;
}

.topbar a:hover {
  color: #fff;
}

.topbar-sep {
  opacity: .3;
}

.social {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}

.social a {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  transition: background .15s, transform .15s;
}

.social a:hover {
  background: var(--bordeaux);
  color: #fff;
  transform: translateY(-1px);
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  box-shadow: 0 2px 12px rgba(10, 17, 40, .06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}


.nav-logo-text {
  line-height: 1.15;
}

.nav-logo-text .line1 {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--bordeaux);
}

.nav-logo-text .line2 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--navy);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin-left: auto;
  margin-right: 16px;
}

nav ul a {
  display: block;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 0;
  transition: color .15s;
  position: relative;
}

nav ul a:hover {
  color: var(--navy);
}

nav ul a.active {
  color: var(--bordeaux);
  font-weight: 600;
}

nav ul a.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--bordeaux);
}

.nav-rdv {
  background: transparent;
  color: var(--navy);
  padding: 8px 20px;
  border-radius: 0;
  border: 1.5px solid var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.nav-rdv:hover {
  background: var(--navy);
  color: #fff;
}

/* HERO */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      var(--cream) 0%,
      var(--cream) 20%,
      rgba(249, 249, 249, .95) 38%,
      rgba(249, 249, 249, .70) 55%,
      rgba(249, 249, 249, .10) 75%,
      transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 56px 48px;
  max-width: 520px;
  margin-left: min(20%, 260px);
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  border-left: 3px solid var(--bordeaux);
  padding-left: 10px;
}

.hero-h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3.8vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.5px;
  color: var(--navy);
  margin-bottom: 14px;
}

.hero-h1 span {
  color: var(--bordeaux);
  font-style: italic;
  font-weight: 400;
}

.hero-sub {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bordeaux);
  color: #fff;
  padding: 12px 28px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background .2s;
}

.hero-btn:hover {
  background: var(--navy);
}

.hero-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2.2;
}

/* GRID SECTION : formations + pourquoi + vie */
.main-grid {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.main-grid-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  max-width: 1200px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
}

.grid-col {
  padding: 44px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Col formations */
.col-title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--bordeaux);
}

.f-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 16px;
}

.f-ico {
  width: calc(33.333% - 11px);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color .2s, background .2s, transform .2s;
  text-align: center;
}

.f-ico:hover {
  border-color: var(--line);
  background: var(--cream);
  transform: translateY(-2px);
}

.f-ico:hover .f-ico-box {
  background: rgba(165, 28, 48, .10);
}

.f-ico:hover .f-ico-box svg {
  stroke: var(--bordeaux);
}

.f-ico-box {
  width: 52px;
  height: 52px;
  border-radius: 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.f-ico-box svg {
  width: 26px;
  height: 26px;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke .2s;
}

.f-ico-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

/* Col pourquoi */
.why-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.why-dot {
  width: 22px;
  height: 22px;
  border-radius: 0;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--bordeaux);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-dot svg {
  width: 11px;
  height: 11px;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.why-item strong {
  display: block;
  font-weight: 600;
  color: var(--navy);
  font-size: 14px;
}

.why-item span {
  font-size: 13px;
  color: var(--muted2);
}

/* Col vie étudiante */
.vie-photo {
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(10, 17, 40, .10);
}

.vie-photo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.vie-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vie-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color .2s, background .2s;
}

.vie-link:hover {
  border-color: var(--bordeaux);
  background: var(--cream);
  color: var(--navy);
}

.vie-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--bordeaux);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.vie-link-arrow {
  margin-left: auto;
  opacity: .4;
  font-size: 13px;
}

/* SECTION CHIFFRES */
.chiffres {
  background: var(--navy);
  padding: 52px 48px;
}

.chiffres-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.chiffre {
  text-align: center;
  padding: 20px 16px;
  border-right: 1px solid rgba(255, 255, 255, .10);
}

.chiffre:last-child {
  border-right: none;
}

.chiffre-n {
  font-family: "Playfair Display", serif;
  font-size: 50px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.chiffre-n span {
  color: var(--bordeaux);
}

.chiffre-l {
  font-size: 13px;
  color: rgba(255, 255, 255, .50);
  margin-top: 6px;
  letter-spacing: .3px;
}

/* FORMATIONS DÉTAIL */
.formations-detail {
  padding: 72px 48px;
  background: var(--cream);
  border-top: 1px solid var(--line);
}

.fd-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.fd-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.fd-title {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}

.fd-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted3);
  text-decoration: none;
  transition: color .15s;
}

.fd-more:hover {
  color: var(--bordeaux);
}

/* --- Slider Formations --- */
.slider-container {
  position: relative;
  width: 100%;
  padding: 0 90px 45px 90px;
  box-sizing: border-box;
}

.slider-viewport {
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.slider-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bordeaux);
  border: 1px solid var(--bordeaux);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 10;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.slider-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-50%) scale(1.05);
}

.slider-btn:disabled {
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--navy);
  opacity: 0.4;
  cursor: not-allowed;
}

.slider-btn.prev {
  left: 15px;
}

.slider-btn.next {
  right: 15px;
}

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.slider-dot:hover {
  background: var(--muted2);
}

.slider-dot.active {
  background: var(--bordeaux);
  transform: scale(1.2);
}

.fd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: transparent;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.fd-card {
  background: var(--white);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: background .18s;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fd-card:hover {
  background: #fdf4f5;
}

.fd-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--bordeaux);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .25s;
}

.fd-card:hover::before {
  transform: scaleY(1);
}

.fd-card-code {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bordeaux);
  margin-bottom: 12px;
}

.fd-card-name {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.fd-card-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ACTU */
.actu-section {
  padding: 72px 48px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.actu-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.actu-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 18px;
  margin-top: 32px;
}

.actu-main {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}

.actu-main img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.actu-body {
  padding: 22px;
}

.actu-date {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bordeaux);
  margin-bottom: 9px;
}

.actu-title {
  font-family: "Playfair Display", serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 9px;
}

.actu-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.actu-lien {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted3);
  text-decoration: none;
  transition: color .15s;
}

.actu-lien:hover {
  color: var(--bordeaux);
}

.actu-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.actu-small {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 20px;
  flex: 1;
  transition: box-shadow .2s;
}

.actu-small:hover {
  box-shadow: 0 4px 16px rgba(10, 17, 40, .07);
}

.actu-small .actu-title {
  font-size: 15px;
}

/* FOOTER */
footer {
  background: var(--navy);
  padding: 56px 48px 26px;
}

.ft-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.ft-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.ft-logo {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.ft-sub {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .28);
  margin-bottom: 14px;
}

.ft-txt {
  font-size: 13px;
  color: rgba(255, 255, 255, .42);
  line-height: 1.75;
}

.ft-col h4 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .30);
  margin-bottom: 14px;
}

.ft-col ul {
  list-style: none;
}

.ft-col ul li {
  margin-bottom: 8px;
}

.ft-col ul li a {
  font-size: 13.5px;
  color: rgba(255, 255, 255, .40);
  text-decoration: none;
  transition: color .15s;
}

.ft-col ul li a:hover {
  color: #fff;
}

.ft-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, .20);
}

.ft-bottom a {
  color: rgba(255, 255, 255, .30);
  text-decoration: none;
}

.ft-bottom a:hover {
  color: #fff;
}

/* ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.on {
  opacity: 1;
  transform: none;
}

/* =============================================
   HAMBURGER BUTTON (hidden on desktop)
   ============================================= */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 310;
  order: 10;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* OVERLAY for mobile nav */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 40, .45);
  z-index: 290;
  opacity: 0;
  transition: opacity .3s ease;
}

.nav-overlay.open {
  display: block;
  opacity: 1;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* ---- Tablet & smaller desktops (≤ 1024px) ---- */
@media (max-width: 1024px) {
  .topbar {
    padding: 7px 24px;
  }

  nav {
    padding: 0 24px;
  }

  .hero-content {
    padding: 0 32px 48px 32px;
    margin-left: min(10%, 80px);
  }
}

/* ---- ≤ 960px : masquer 3 liens, burger ouvre tiroir complet ---- */
@media (max-width: 960px) {
  .nav-burger {
    display: flex;
  }

  nav ul .nav-hide-first {
    display: none;
  }

  .nav-rdv {
    display: none;
  }

  /* Quand ouvert : le ul devient un tiroir latéral avec TOUS les liens */
  nav ul.open {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--cream);
    flex-direction: column;
    padding: 80px 28px 40px;
    margin: 0;
    gap: 0;
    z-index: 300;
    box-shadow: -6px 0 30px rgba(10, 17, 40, .12);
    overflow-y: auto;
    animation: navSlideIn .3s ease forwards;
  }

  nav ul.open .nav-hide-first {
    display: list-item;
  }

  nav ul.open a {
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  nav ul.open a.active::after {
    display: none;
  }
}

@keyframes navSlideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

/* ---- ≤ 950px : masquer tous les liens restants ---- */
@media (max-width: 600px) {

  /* --- Topbar --- */
  .topbar {
    padding: 6px 16px;
    font-size: 11px;
    gap: 12px;
  }

  /* --- Nav --- */
  nav {
    padding: 0 16px;
    height: 58px;
  }

  .nav-burger {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--cream);
    flex-direction: column;
    padding: 80px 28px 40px;
    margin: 0;
    gap: 0;
    z-index: 300;
    box-shadow: -6px 0 30px rgba(10, 17, 40, .12);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
  }

  nav ul.open {
    transform: translateX(0);
  }

  nav ul a {
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  nav ul a.active::after {
    display: none;
  }

  .nav-search {
    flex: 1;
    margin: 0 16px;
    justify-content: center;
  }

  .nav-search-toggle {
    display: none;
  }

  .nav-search-form {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 150px !important;
    opacity: 1 !important;
    padding: 4px 0 !important;
    background: transparent !important;
    display: flex !important;
  }

  .nav-search-form input {
    width: 100%;
    min-width: 0;
  }

  .nav-rdv {
    display: none;
  }

  /* --- Hero --- */
  .hero {
    height: 420px;
  }

  .hero-content {
    padding: 0 24px 40px;
    margin: 0 auto;
    max-width: 520px;
    text-align: center;
  }

  .hero-tag {
    border-left: none;
    padding-left: 0;
    border-bottom: 3px solid var(--bordeaux);
    padding-bottom: 6px;
  }

  .hero-overlay {
    background: linear-gradient(to top,
        var(--cream) 0%,
        rgba(249, 249, 249, .95) 25%,
        rgba(249, 249, 249, .75) 50%,
        rgba(249, 249, 249, .30) 75%,
        transparent 100%);
  }

  .hero {
    align-items: flex-end;
  }

  /* --- Grilles restantes (inchangé) --- */
  .main-grid-inner {
    grid-template-columns: 1fr;
  }

  .chiffres-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .fd-grid {
    grid-template-columns: 1fr 1fr;
  }

  .actu-grid {
    grid-template-columns: 1fr;
  }

  .ft-top {
    grid-template-columns: 1fr 1fr;
  }

  footer,
  .formations-detail,
  .actu-section {
    padding: 48px 24px;
  }

  .chiffres {
    padding: 36px 24px;
  }
}

/* ---- ≤ 600px : ajustements mobiles supplémentaires ---- */
@media (max-width: 600px) {

  /* --- Topbar --- */
  .topbar {
    padding: 5px 12px;
    font-size: 10.5px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .social {
    margin-left: 4px;
  }

  /* --- Nav --- */
  nav {
    padding: 0 12px;
    height: 54px;
  }

  .nav-logo-text .line1 {
    font-size: 9.5px;
    letter-spacing: 1.5px;
  }

  .nav-logo-text .line2 {
    font-size: 15px;
  }

  /* --- Hero --- */
  .hero {
    height: 380px;
  }

  .hero-content {
    padding: 0 16px 32px;
    max-width: 100%;
    text-align: center;
  }

  .hero-tag {
    font-size: 9.5px;
    letter-spacing: 2px;
    margin-bottom: 10px;
  }

  .hero-h1 {
    font-size: clamp(26px, 7vw, 36px);
    margin-bottom: 10px;
  }

  .hero-sub {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .hero-btn {
    padding: 10px 22px;
    font-size: 11px;
  }

  /* Grilles restantes */
  .fd-grid {
    grid-template-columns: 1fr;
  }

  .ft-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  footer,
  .formations-detail,
  .actu-section {
    padding: 36px 16px;
  }

  .chiffres {
    padding: 28px 16px;
  }
}

/* ---- ≤ 400px : très petits écrans ---- */
@media (max-width: 400px) {


  .topbar a {
    font-size: 10px;
  }

  .topbar-sep {
    display: none;
  }

  nav {
    height: 50px;
  }

  .nav-logo-text .line2 {
    font-size: 14px;
  }

  nav ul {
    width: 100%;
  }

  .hero {
    height: 340px;
  }

  .hero-h1 {
    font-size: 24px;
  }

  .hero-sub {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .hero-btn {
    padding: 9px 18px;
    font-size: 10.5px;
  }
}

/* SEARCH BAR */
.nav-search {
  display: flex;
  align-items: center;
  position: relative;
  margin-right: auto;
}

.nav-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
  flex-shrink: 0;
}

.nav-search-toggle:hover {
  color: var(--bordeaux);
}

.nav-search-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-search-form {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  background: var(--cream);
  padding: 0;
  transition: max-width .35s ease, opacity .25s ease, padding .35s ease;
  white-space: nowrap;
  border-radius: 4px;
}

.nav-search-form.open {
  max-width: 300px;
  opacity: 1;
  padding: 4px 8px;
}

.nav-search-form input {
  width: 200px;
  border: none;
  border-bottom: 1.5px solid var(--bordeaux);
  background: transparent;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  color: var(--navy);
  padding: 4px 6px;
  caret-color: var(--bordeaux);
}

.nav-search-form input::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.nav-search-form button[type="submit"] {
  display: none;
}