/* ==========================================================================
   1. VARIABLES GLOBALES & RESET
   ========================================================================== */
:root {
  --primary: #5c258d;
  --primary-hover: #431969;
  --accent: #f7931e;
  --text-dark: #222222;
  --text-muted: #666666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

body {
  background-color: var(--bg-light);
}

/* Skip link visible on focus for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  z-index: 9999;
  border-radius: 6px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* UTILITAIRES */
.text-center {
  text-align: center;
}

.margin-top-lg {
  margin-top: 2.5rem;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  background: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 0.75rem 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  max-height: 55px;
  width: auto;
  display: block;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.btn-contact-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.btn-contact-nav:hover {
  background: var(--primary-hover);
}

.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
}

/* ==========================================================================
   3. HERO & BANNIÈRES
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, rgba(92, 37, 141, 0.05) 0%, rgba(247, 147, 30, 0.05) 100%);
  padding: 4rem 0;
}

.hero-content {
  max-width: 750px;
}

.badge {
  display: inline-block;
  background: rgba(92, 37, 141, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #431969 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.page-banner h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.page-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ==========================================================================
   4. BOUTONS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-large {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   5. BANDEAU DE RÉASSURANCE (QUALIOPI)
   ========================================================================== */
.trust-bar {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}

.trust-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.qualiopi-img {
  max-height: 65px;
  width: auto;
}

.certif-logo {
  max-height: 45px;
  width: auto;
}

.trust-text {
  flex: 1;
}

.trust-text strong {
  color: var(--primary);
  font-size: 1rem;
  display: block;
}

.trust-text p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   6. SECTIONS, FILTRES & CARTES FORMATIONS
   ========================================================================== */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1.5rem;
}

.card-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.card {
  will-change: transform, opacity;
}

.btn {
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Sécurité affichage cartes si JS lent/bloqué */
.cards-grid .card {
  opacity: 1;
}

/* ==========================================================================
   7. PAGE À PROPOS
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about-text h3 {
  color: var(--primary);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem 0;
}

.about-text p {
  margin-bottom: 1rem;
  color: #4a5568;
}

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.expertise-box, .schedule-box {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.expertise-box h3, .schedule-box h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
}

.expertise-list {
  list-style: none;
}

.expertise-list li {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.expertise-list .year {
  background: var(--primary);
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.schedule-table td {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.schedule-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.schedule-table .closed {
  color: #e53e3e;
}

/* ==========================================================================
   8. PAGE CONTACT
   ========================================================================== */
.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-details-box, .contact-form-box {
  background: #ffffff;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.contact-details-box h2, .contact-form-box h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.tagline-dark {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.contact-detail-item {
  margin-bottom: 1.5rem;
}

.contact-detail-item h4 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.contact-detail-item p {
  font-size: 0.95rem;
  color: #4a5568;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-dark);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  color: var(--text-dark);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--primary);
}

/* ==========================================================================
   9. MODALE PROGRAMME MODERNISÉE
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(15, 13, 26, 0.75);
  backdrop-filter: blur(4px); /* Effet de flou moderne sur l'arrière-plan */
}

.modal-container {
  position: relative;
  background: #ffffff;
  width: 90%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  z-index: 2001;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* En-tête de la modale */
.modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, #431969 100%);
  color: #ffffff;
  padding: 1.75rem 2rem;
  position: relative;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.modal-title {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  padding-right: 2rem;
  line-height: 1.3;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Corps de la modale */
.modal-body {
  padding: 1.75rem 2rem 2rem 2rem;
}

.modal-meta-bar {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-meta-item strong {
  color: var(--primary);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Liste des modules / programmes */
.modal-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.modal-list {
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
}

.modal-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.5;
}

/* Puces personnalisées sous forme de coche moderne */
.modal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 20px;
  height: 20px;
  background: rgba(92, 37, 141, 0.1);
  color: var(--primary);
  font-weight: bold;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pied de la modale */
.modal-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   10. FOOTER AMÉLIORÉ
   ========================================================================== */
.footer {
  background: linear-gradient(180deg, #181528 0%, #0f0d1a 100%);
  color: #a0a0b0;
  padding: 4rem 0 0 0;
  font-size: 0.9rem;
  border-top: 3px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 0.8fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-logo {
  max-height: 50px;
  width: auto;
  margin-bottom: 0.5rem;
  filter: brightness(1.1);
}

.footer-motto {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: #8c8ca1;
}

.footer-badge-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mini-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d1d1e0;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.footer-title {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-certif-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: var(--radius);
}

.footer-qualiopi-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 4px;
  background: #ffffff;
  padding: 4px;
  margin-bottom: 0.75rem;
}

.certif-subtext {
  font-size: 0.75rem;
  color: #a0a0b0;
  line-height: 1.4;
}

.certif-subtext strong {
  color: #ffffff;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #a0a0b0;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-contact-info p {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #c0c0d0;
}

.footer-contact-info strong {
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.margin-top-sm {
  margin-top: 0.75rem;
}

/* PIED DE PAGE BAS */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #707085;
}

.footer-legal-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  color: #707085;
  text-decoration: none;
  transition: var(--transition);
}

.footer-legal-links a:hover {
  color: #ffffff;
}

/* RESPONSIVE FOOTER */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   11. STYLE DE LA PAGE ACTUALITÉS
   ========================================================================== */
.news-date {
  font-size: 0.8rem !important;
  color: var(--accent) !important;
  font-weight: 600;
  margin-bottom: 0.75rem !important;
}

.news-card {
  justify-content: space-between;
}

/* ==========================================================================
   12. RESPONSIVE & MENU BURGER MOBILE
   ========================================================================== */

/* Écrans intermédiaires & tablettes (<= 992px) */
@media (max-width: 992px) {
  /* Affichage du bouton burger */
  .burger-menu {
    display: flex;
    z-index: 1001;
  }

  /* Transformation du burger lors de l'activation */
  .burger-menu[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45倍deg);
  }
  .burger-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Animation fluide sur les barres du burger */
  .burger-menu span {
    transition: var(--transition);
  }

  /* Navigation mobile (Overlay / Panneau coulissant) */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    padding: 6rem 2rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }

  /* Ouverture du menu navigation */
  .nav.active {
    right: 0;
  }

  /* Disposer la liste des liens en colonne */
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
  }

  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    display: block;
    padding: 0.5rem 0;
  }

  .btn-contact-nav {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }

  /* Grilles adaptatives pour tablettes */
  .about-grid,
  .contact-page-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .trust-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* Mobiles (<= 576px) */
@media (max-width: 576px) {
  .hero {
    padding: 2.5rem 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .filters {
    flex-wrap: wrap;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

  .modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 1.25rem 1.5rem;
  }

  .modal-body {
    padding: 1.25rem 1.5rem;
  }

  .modal-meta-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}