/* ==========================================================================
   VARIABLES CSS - Définition centralisée des valeurs
   ========================================================================== */
:root {
  /* Couleurs principales */
  --blue: #005BAA;
  --blue-dark: #004080;
  --lime: #A5E72D;
  --lime-dark: #8CD61F;
  
  /* Couleurs de base */
  --bg: #F7FAFC;
  --border: #D6E4F0;
  --text: #1A1A1A;
  --muted: #333333;
  --white: #fff;
  
  /* Espacements */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Rayons de bordure */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 24px;
  
  /* Ombres */
  --shadow-light: 0 1px 3px rgba(0,0,0,.05);
  --shadow-medium: 0 2px 6px rgba(0,0,0,.06);
  
  /* Typographie */
  --font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ==========================================================================
   RESET ET STYLES DE BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: linear-gradient(to bottom, var(--bg), var(--white));
  color: var(--text);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   CLASSES UTILITAIRES RÉUTILISABLES
   ========================================================================== */

/* Layout */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Espacements */
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Visibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   COMPOSANTS DE BASE
   ========================================================================== */

/* Cartes */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
  padding: var(--spacing-md);
}

/* Cartes sans bordure (style épuré) */
.card-clean {
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
  padding: var(--spacing-md);
}

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-medium);
}

/* Badges */
.badge {
  padding: var(--spacing-xs);
  border: 1px dashed var(--lime);
  background: #F5FFD9;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SYSTÈME DE BOUTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  border-radius: var(--radius-md);
  padding: 10px var(--spacing-md);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-accent {
  background: var(--lime);
  color: var(--text);
}

.btn-accent:hover {
  background: var(--lime-dark);
}

.btn-outline {
  background: var(--white);
  border-color: var(--border);
  color: var(--blue);
}

.btn-outline:hover {
  border-color: var(--lime);
}

/* ==========================================================================
   TYPOGRAPHIE
   ========================================================================== */
h1 {
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.1;
  color: var(--blue);
  margin: 0;
}

h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--blue);
  margin: 0 0 18px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 0;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

p.lead {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--muted);
  margin: 20px 0 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

header .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.nav {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.brand img {
  height: 36px;
  width: 36px;
  border-radius: 14px;
  object-fit: cover;
}

nav {
  display: none;
}

@media(min-width: 768px) {
  nav {
    display: flex;
  }
}

/* ==========================================================================
   SECTIONS PRINCIPALES
   ========================================================================== */

/* Hero */
.hero {
  padding: 72px 0 96px;
}

.hero-actions {
  margin-top: 28px;
  margin-bottom: 32px;
  display: flex;
  gap: var(--spacing-sm);
}

/* Espacement après les groupes de boutons */
.btn + .btn + .btn {
  margin-bottom: var(--spacing-lg);
}

/* Conteneur de boutons avec espacement */
div:has(.btn) {
  margin-bottom: var(--spacing-lg);
}

/* Alternative: espacement direct sur les boutons en groupe */
.btn:last-of-type {
  margin-bottom: var(--spacing-lg);
}

/* Breadcrumb - styles génériques */
nav a,
.breadcrumb a,
a[href*="Accueil"],
a[href*="Catalogue"] {
  margin: 0 var(--spacing-xs);
  line-height: 1.6;
  display: inline-block;
}

/* Espacement pour les liens de navigation en début de page */
body > a:first-of-type,
main > a:first-of-type {
  margin-left: 0;
  margin-bottom: var(--spacing-md);
  display: inline-block;
}

.glow {
  position: absolute;
  inset: -40px;
  z-index: -1;
  border-radius: 48px;
  filter: blur(36px);
  background: linear-gradient(45deg, rgba(165,231,45,.45), rgba(216,247,160,.45), transparent);
}

.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

/* Sections avec arrière-plan */
.section-bg {
  background: var(--bg);
  padding: 56px 0;
}

/* Atouts */
.atouts-grid {
  display: grid;
  gap: 18px;
}

.atout {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-light);
}

.atout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.atout b {
  color: var(--blue);
}

/* Services */
.services {
  padding: 40px 0;
}

.services-grid {
  display: grid;
  gap: 18px;
}

.list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  gap: var(--spacing-xs);
  align-items: flex-start;
  margin: var(--spacing-xs) 0;
  color: var(--muted);
  font-size: 14px;
}

.list svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* Contact */
.contact {
  padding: 64px 0;
}

/* ==========================================================================
   FORMULAIRES
   ========================================================================== */
form .row {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  box-shadow: 0 0 0 2px var(--lime);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  color: #334;
}

.inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--blue);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media(min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  
  form .row {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-row {
    flex-direction: row;
  }
  
  .hero-actions {
    flex-wrap: wrap;
  }
}

@media(min-width: 960px) {
  .atouts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Breadcrumb (fil d'Ariane) ======================================= */
.breadcrumb{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  font-size:14px;
  color: var(--muted);
  margin: 0 0 8px 0;
}
.breadcrumb a{ color: var(--blue); }
.breadcrumb [aria-current="page"]{ color: var(--blue); font-weight:600; }
/* ====================================================================== */


/* ===== CTA row ======================================================== */
.cta-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 16px;
  flex-wrap: nowrap; /* même ligne sur desktop */
  margin-top: 20px;
}
@media (max-width: 640px){
  .cta-row{ flex-wrap: wrap; } /* autorise le retour à la ligne sur mobile */
}
/* ====================================================================== */


/* ===== Footer inline links =========================================== */
.footer-inline{
  display:flex;
  gap:16px;
  align-items:center;
}
/* ====================================================================== */


/* ===== CTA row (sur une seule ligne desktop) =========================== */
.cta-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 16px;
  flex-wrap: nowrap;
  margin-top: 20px;
}
@media (max-width: 640px){
  .cta-row{ flex-wrap: wrap; }
}
/* ====================================================================== */


/* ===== Footer inline links =========================================== */
.footer-inline{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:center;
}
/* ====================================================================== */


/* ===== Bloc d'infos formation (Prérequis / Public / Durée / Tarif) ===== */
.course-meta{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-light);
  margin: 10px 0 18px;
}
.course-meta .row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}
.course-meta .row + .row{ margin-top: var(--spacing-sm); }
.course-meta strong{
  color: var(--blue);
}
.course-meta .small{
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 768px){
  .course-meta .row{ grid-template-columns: 1fr; }
}

/* Surcharges header : alignement vertical parfait */
header .nav a { 
  line-height: 1;       /* annule le 1.6 global pour le header */
  padding: 10px 0;      /* hauteur proche du bouton */
}

.btn { 
  line-height: 1;       /* assure un centrage texte/bouton impeccable */
}

/* Corrige l'alignement vertical du bouton Contact dans le header */
header .btn.btn-accent {
  display: flex;
  align-items: center;
  padding-top: 10px;   /* même que nav a */
  padding-bottom: 10px;
  height: auto;        /* évite un décalage lié à la hauteur forcée */
  margin: 0;           /* supprime tout décalage vertical résiduel */
}

/* CTA parfaitement centré et sur sa propre ligne */
.container .cta-row{
  display: flex;
  justify-content: center !important; /* force le centrage */
  align-items: center;
  gap: 16px;
  width: 100%;             /* occupe toute la ligne du conteneur */
  margin-top: 20px;
}

/* Si un parent est en flex avec space-between, on neutralise l’auto-alignment */
.container .cta-row > * {
  margin: 0;               /* évite des marges héritées qui décalent */
}

/* Sur mobile : retour à la ligne si besoin */
@media (max-width: 640px){
  .container .cta-row{
    flex-wrap: wrap;
  }
}


/* ====================================================================== */
