/**
 * IUTEA — Feuille de style principale
 * Identité visuelle officielle (rouge bordeaux + croix + sacré-cœur)
 */

:root {
  /* === COULEURS OFFICIELLES IUTEA (extraites du logo) === */
  --iutea-bordeaux: #8B0000;
  --iutea-bordeaux-light: #B22222;
  --iutea-bordeaux-dark: #5C0000;
  --iutea-rouge-vif: #DC143C;
  --iutea-or: #C9A961;
  --iutea-noir: #1A1A1A;
  --iutea-blanc: #FFFFFF;

  /* === ALIAS SÉMANTIQUES (modifiables par le CMS de thème) === */
  --color-primary: var(--iutea-bordeaux);
  --color-primary-light: var(--iutea-bordeaux-light);
  --color-primary-dark: var(--iutea-bordeaux-dark);
  --color-secondary: var(--iutea-rouge-vif);
  --color-accent: var(--iutea-or);
  --color-text: var(--iutea-noir);
  --color-text-light: #4A4A4A;
  --color-text-muted: #6B6B6B;
  --color-background: var(--iutea-blanc);
  --color-background-alt: #FAFAFA;
  --color-surface: var(--iutea-blanc);
  --color-border: #E5E5E5;
  --color-success: #1D7A4C;
  --color-warning: #D97706;
  --color-danger: #B91C1C;
  --color-info: #1E40AF;

  /* === TYPOGRAPHIE === */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-size-base: 16px;
  --line-height: 1.6;

  /* === LAYOUT === */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 25px -5px rgb(139 0 0 / 0.15);
  --shadow-xl: 0 25px 50px -12px rgb(139 0 0 / 0.25);

  --container-max: 1280px;
  --transition-fast: 0.15s ease;
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

/* === TYPOGRAPHIE === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1rem; color: var(--color-text-light); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-secondary); }

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}
/* Menu mobile au-dessus de tout, overlay en dessous */
.mobile-menu { z-index: 9999 !important; }

.header-top {
  background: var(--iutea-noir);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-top a { color: rgba(255, 255, 255, 0.85); }
.header-top a:hover { color: var(--iutea-or); }
.header-top-info { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.header-main {
  padding: 1rem 0;
}
.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand-logo { height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--iutea-bordeaux);
  letter-spacing: 0.05em;
  line-height: 1;
}
.brand-tagline {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 0.5rem; }
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  position: relative;
}
.main-nav a:hover {
  background: rgba(139, 0, 0, 0.06);
  color: var(--iutea-bordeaux);
}
.main-nav a.active {
  color: var(--iutea-bordeaux);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--iutea-bordeaux);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--iutea-bordeaux);
  color: white;
  border-color: var(--iutea-bordeaux);
}
.btn-primary:hover {
  background: var(--iutea-bordeaux-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: var(--iutea-rouge-vif);
  color: white;
  border-color: var(--iutea-rouge-vif);
}
.btn-outline {
  background: transparent;
  color: var(--iutea-bordeaux);
  border-color: var(--iutea-bordeaux);
}
.btn-outline:hover {
  background: var(--iutea-bordeaux);
  color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* === HERO === */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(139,0,0,0.92) 0%, rgba(92,0,0,0.96) 100%),
    url('/assets/images/hero-campus.jpg') center/cover;
  color: white;
  padding: 6rem 0 7rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(220, 20, 60, 0.3) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '✠';
  position: absolute;
  right: -50px;
  bottom: -80px;
  font-size: 25rem;
  color: rgba(255, 255, 255, 0.05);
  font-family: serif;
  line-height: 1;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero h1 {
  color: white;
  max-width: 800px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
}
.hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
  max-width: 650px;
  margin-bottom: 2.5rem;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-actions .btn-primary {
  background: white;
  color: var(--iutea-bordeaux);
  border-color: white;
}
.hero-actions .btn-primary:hover {
  background: var(--iutea-or);
  color: var(--iutea-noir);
  border-color: var(--iutea-or);
}
.hero-actions .btn-outline {
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}
.hero-actions .btn-outline:hover {
  background: white;
  color: var(--iutea-bordeaux);
}

/* === SECTIONS === */
.section { padding: 5rem 0; }
.section-alt { background: var(--color-background-alt); }
.section-dark {
  background: var(--iutea-noir);
  color: rgba(255, 255, 255, 0.9);
}
.section-dark h2, .section-dark h3 { color: white; }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.section-header .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--iutea-bordeaux);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-header h2 {
  margin-bottom: 0.75rem;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
}

/* === CARDS === */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--iutea-bordeaux);
}

/* Filière card */
.filiere-card {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.filiere-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--filiere-color, var(--iutea-bordeaux)) 200%);
  opacity: 0.05;
  transition: opacity var(--transition);
  pointer-events: none;
}
.filiere-card:hover::before { opacity: 0.12; }
.filiere-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--filiere-color, var(--iutea-bordeaux));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}
.filiere-card h3 {
  margin-bottom: 0.5rem;
  position: relative;
}
.filiere-card .filiere-code {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--filiere-color, var(--iutea-bordeaux));
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.filiere-card p {
  flex: 1;
  margin-bottom: 1.5rem;
}
.filiere-card .filiere-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--filiere-color, var(--iutea-bordeaux));
  font-weight: 600;
  position: relative;
}
.filiere-card .filiere-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}
.filiere-card .filiere-link:hover::after { transform: translateX(4px); }

/* === GRID === */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* === STATS === */
.stats-section {
  background: linear-gradient(135deg, var(--iutea-bordeaux) 0%, var(--iutea-bordeaux-dark) 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(201, 169, 97, 0.15) 0%, transparent 50%);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  position: relative;
}
.stat-item { text-align: center; }
.stat-item .icon {
  font-size: 2rem;
  color: var(--iutea-or);
  margin-bottom: 0.5rem;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: white;
}
.stat-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

/* === ACTUALITÉS === */
.actu-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.actu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.actu-image {
  height: 220px;
  background: linear-gradient(135deg, var(--iutea-bordeaux), var(--iutea-bordeaux-dark));
  background-size: cover;
  background-position: center;
  position: relative;
}
.actu-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4));
}
.actu-categorie {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--iutea-bordeaux);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}
.actu-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.actu-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.actu-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.actu-content p {
  flex: 1;
  font-size: 0.95rem;
}

/* === TÉMOIGNAGES === */
.temoignage-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--color-border);
  position: relative;
}
.temoignage-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-size: 4rem;
  font-family: var(--font-heading);
  color: var(--iutea-bordeaux);
  opacity: 0.2;
  line-height: 1;
}
.temoignage-card .contenu {
  font-style: italic;
  color: var(--color-text-light);
  margin: 1rem 0 1.5rem;
  position: relative;
}
.temoignage-card .auteur {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.temoignage-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--iutea-bordeaux);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.temoignage-card .auteur-info .nom { font-weight: 600; color: var(--color-text); }
.temoignage-card .auteur-info .fonction { font-size: 0.85rem; color: var(--color-text-muted); }
.temoignage-card .stars { color: var(--iutea-or); margin-bottom: 0.5rem; }

/* === FOOTER === */
.site-footer {
  background: var(--iutea-noir);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 0;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) 1.3fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 0.5rem; }
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}
.footer-section a:hover { color: var(--iutea-or); }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: white;
}
.footer-brand img { height: 48px; }
.footer-brand-text { font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; color: white; }

.footer-newsletter {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}
.footer-newsletter form { display: flex; gap: 0.5rem; }
.footer-newsletter input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-family: inherit;
}
.footer-newsletter input::placeholder { color: rgba(255, 255, 255, 0.5); }

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--transition);
}
.footer-social a:hover {
  background: var(--iutea-bordeaux);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* === FORMS === */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-size: 0.9rem;
}
.form-label .required { color: var(--iutea-bordeaux); }
.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--iutea-bordeaux);
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.12);
}
.form-error {
  color: var(--iutea-bordeaux);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* === ALERTS === */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid;
  margin-bottom: 1.25rem;
}
.alert-success { background: #ECFDF5; border-color: var(--color-success); color: #065F46; }
.alert-warning { background: #FFFBEB; border-color: var(--color-warning); color: #92400E; }
.alert-danger { background: #FEF2F2; border-color: var(--color-danger); color: #991B1B; }
.alert-info { background: #EFF6FF; border-color: var(--color-info); color: #1E3A8A; }

/* === BREADCRUMB === */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--iutea-bordeaux); }
.breadcrumb .separator { margin: 0 0.5rem; }

/* === PRÉINSCRIPTION STEPPER === */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
  counter-reset: step;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
  counter-increment: step;
}
.step .step-number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: white;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: 700;
  transition: all var(--transition);
}
.step .step-number::before { content: counter(step); }
.step .step-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.step.active .step-number,
.step.completed .step-number {
  background: var(--iutea-bordeaux);
  border-color: var(--iutea-bordeaux);
  color: white;
}
.step.active .step-label { color: var(--iutea-bordeaux); font-weight: 600; }

/* =========================================================
   HAMBURGER — MENU MOBILE
   ========================================================= */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--transition-fast);
}
.hamburger:hover { border-color: var(--iutea-bordeaux); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HEADER FIXE
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}

/* =========================================================
   MENU MOBILE DRAWER
   ========================================================= */

.mobile-menu {
  display: block;
  position: fixed;
  top: 72px;
  right: 0;
  width: min(320px, 85vw);
  height: calc(100vh - 72px);
  background: white;
  z-index: 9999;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  overflow-y: auto;
  padding: 1rem 1.5rem 1.5rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  visibility: hidden;
  pointer-events: auto !important;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.mobile-menu nav a:hover,
.mobile-menu nav a.active {
  color: var(--iutea-bordeaux);
  background: rgba(139,0,0,0.04);
  padding-left: 1.5rem;
}
.mobile-menu nav a.active {
  border-left: 3px solid var(--iutea-bordeaux);
}
.mobile-menu .mobile-cta {
  margin-top: 1.5rem;
  background: var(--iutea-bordeaux) !important;
  color: white !important;
  border-radius: var(--radius);
  justify-content: center;
  border: none !important;
  padding: 0.875rem 1.5rem !important;
  font-weight: 700 !important;
}
.mobile-menu .mobile-cta:hover {
  background: var(--iutea-bordeaux-dark) !important;
  padding-left: 1.5rem !important;
}

/* =========================================================
   OVERLAY SOMBRE
   ========================================================= */

.mobile-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.mobile-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.menu-open { overflow: hidden; }

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

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   RESPONSIVE MOBILE LARGE
   ========================================================= */

@media (max-width: 968px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-cta-btn .cta-text { display: none; }
  .header-cta-btn { padding: 0.625rem 0.875rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .hero { padding: 4rem 0 5rem; }
  .section { padding: 3.5rem 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

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

@media (max-width: 640px) {
  .header-top { display: none; }
  .brand-logo { height: 44px; }
  .mobile-menu { top: 64px; height: calc(100vh - 64px); width: min(300px, 88vw); }
  .hero { padding: 3rem 0 4rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-carousel { height: clamp(400px, 85vh, 580px); }
  .slide-titre { font-size: 1.75rem !important; }
  .slide-sous-titre { font-size: 1rem !important; }
  .slide-actions { flex-direction: column; }
  .slide-actions .btn-slide-primary,
  .slide-actions .btn-slide-outline { width: 100%; justify-content: center; }
  .carousel-btn { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-newsletter form { flex-direction: column; }
  .footer-newsletter input { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 2.25rem; }
  .section { padding: 3rem 0; }
  .section-header { margin-bottom: 2rem; }
  .temoignage-card { padding: 1.25rem; }
  .stepper .step-label { display: none; }
  .stepper::before { left: 10%; right: 10%; }
  .grid-2 { grid-template-columns: 1fr !important; }
  #back-to-top { bottom: 1.25rem; right: 1.25rem; width: 42px; height: 42px; }
}

/* =========================================================
   TRÈS PETIT MOBILE
   ========================================================= */

@media (max-width: 400px) {
  .container { padding: 0 1rem; }
  .brand-logo { height: 38px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-number { font-size: 1.75rem; }
  .mobile-menu { width: 100vw; }
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--iutea-bordeaux);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(139,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  z-index: 90;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--iutea-bordeaux-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139,0,0,0.5);
}

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

/* Tablette (< 1024px) */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile large (< 968px) */
@media (max-width: 968px) {
  /* Header */
  .main-nav { display: none; }
  .hamburger { display: flex; }
  /* mobile-menu et overlay toujours display:block, visibilité gérée par transform/opacity */
  .header-cta-btn .cta-text { display: none; }
  .header-cta-btn { padding: 0.625rem 0.875rem; }

  /* Layout */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .hero { padding: 4rem 0 5rem; }
  .section { padding: 3.5rem 0; }

  /* Grilles */
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

/* Mobile (< 640px) */
@media (max-width: 640px) {
  /* Header */
  .header-top { display: none; }
  .brand-logo { height: 44px; }

  /* Hero */
  .hero { padding: 3rem 0 4rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Hero carousel */
  .hero-carousel { height: clamp(400px, 85vh, 580px); }
  .slide-titre { font-size: 1.75rem !important; }
  .slide-sous-titre { font-size: 1rem !important; }
  .slide-actions { flex-direction: column; }
  .slide-actions .btn-slide-primary,
  .slide-actions .btn-slide-outline { width: 100%; justify-content: center; }
  .carousel-btn { display: none; }

  /* Grilles — 1 colonne */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-newsletter form { flex-direction: column; }
  .footer-newsletter input { width: 100%; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 2.25rem; }

  /* Sections */
  .section { padding: 3rem 0; }
  .section-header { margin-bottom: 2rem; }

  /* Témoignages */
  .temoignage-card { padding: 1.25rem; }

  /* Stepper préinscription */
  .stepper .step-label { display: none; }
  .stepper::before { left: 10%; right: 10%; }

  /* Forms */
  .grid-2 { grid-template-columns: 1fr !important; }

  /* Back to top */
  #back-to-top { bottom: 1.25rem; right: 1.25rem; width: 42px; height: 42px; }
}

/* Très petit mobile (< 400px) */
@media (max-width: 400px) {
  .container { padding: 0 1rem; }
  .brand-logo { height: 38px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-number { font-size: 1.75rem; }
}

/* === UTILITIES === */
.text-center { text-align: center; }
.text-primary { color: var(--iutea-bordeaux); }
.text-muted { color: var(--color-text-muted); }
.fw-700 { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeInUp 0.6s ease-out;
}

/* =========================================================
   HERO CAROUSEL — IUTEA
   ========================================================= */

.hero-carousel {
  position: relative;
  overflow: hidden;
  height: clamp(520px, 85vh, 780px);
  background: var(--iutea-bordeaux-dark);
  user-select: none;
}

/* Track et slides */
.carousel-track {
  display: flex;
  height: 100%;
  transition: none; /* géré en JS */
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
  z-index: 1;
}
.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.carousel-slide.exiting {
  opacity: 0;
  z-index: 3;
}

/* Image de fond */
.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease;
}
.carousel-slide.active .slide-bg {
  transform: scale(1);
}

/* Overlay */
.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Décoration croix */
.slide-deco {
  position: absolute;
  right: -40px;
  bottom: -60px;
  font-size: min(22rem, 40vw);
  color: rgba(255,255,255,0.06);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
  transition: transform 6s ease;
}
.carousel-slide.active .slide-deco {
  transform: rotate(-5deg) translateY(-10px);
}

/* Contenu texte */
.slide-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 860px;
  padding-top: 2rem;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s 0.1s ease, transform 0.6s 0.1s ease;
}
.slide-titre {
  color: white;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s 0.25s ease, transform 0.6s 0.25s ease;
}
.slide-sous-titre {
  color: rgba(255,255,255,0.95);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s 0.4s ease, transform 0.6s 0.4s ease;
}
.slide-description {
  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  max-width: 620px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s 0.5s ease, transform 0.6s 0.5s ease;
}
.slide-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s 0.65s ease, transform 0.6s 0.65s ease;
}

/* Active state animations */
.carousel-slide.active .slide-badge,
.carousel-slide.active .slide-titre,
.carousel-slide.active .slide-sous-titre,
.carousel-slide.active .slide-description,
.carousel-slide.active .slide-actions {
  opacity: 1;
  transform: translateY(0);
}

/* Boutons dans le slide */
.btn-slide-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  background: white;
  color: var(--iutea-bordeaux);
  text-decoration: none;
  border: 2px solid white;
  transition: all 0.3s;
  white-space: nowrap;
}
.btn-slide-primary:hover {
  background: var(--iutea-or);
  color: var(--iutea-noir);
  border-color: var(--iutea-or);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.btn-slide-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
  color: white;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.55);
  transition: all 0.3s;
  white-space: nowrap;
}
.btn-slide-outline:hover {
  background: white;
  color: var(--iutea-bordeaux);
  border-color: white;
}

/* Flèches de navigation */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.carousel-btn:hover {
  background: white;
  color: var(--iutea-bordeaux);
  border-color: white;
  transform: translateY(-50%) scale(1.05);
}
.carousel-prev { left: 1.5rem; }
.carousel-next { right: 1.5rem; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 0;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.carousel-dot.active {
  background: white;
  width: 28px;
  border-radius: 5px;
}

/* Barre de progression auto-play */
.carousel-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,0.6);
  z-index: 10;
  animation: carousel-progress 5s linear infinite;
}
@keyframes carousel-progress {
  from { width: 0; }
  to   { width: 100%; }
}

/* Responsive carousel */
@media (max-width: 768px) {
  .hero-carousel { height: clamp(420px, 90vh, 620px); }
  .carousel-btn { display: none; }
  .slide-badge { font-size: 0.78rem; }
}
