/* ==========================================
   STYLES DE LA PAGE FORMATION
   ========================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fbf9f4;
  color: #333333;
  line-height: 1.6;
}

/* --- BANNIÈRE --- */
/*.page-banner { 
  background-color: #2c353d; 
  color: #ffffff; 
  padding: 2rem 1.5rem; 
  position: sticky;
  top: 0;
  z-index: 1000;
}*/
/* --- BANNIÈRE --- */
.page-banner { 
  background-color: #2c353d; 
  color: #ffffff; 
  
  /* 👉 On force la hauteur pour qu'elle soit identique au header de index.html */
  height: 130px; /* Ajuste cette valeur (130px, 140px) si besoin */
  
  display: flex;
  align-items: center; /* Centre le contenu verticalement */
  
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* On ajuste le conteneur interne pour qu'il prenne toute la largeur */
.banner-inner { 
  max-width: 1400px; 
  margin: 0 auto; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 1rem; 
  width: 100%;
  padding: 0 1.5rem; /* Remplace le padding qui était sur le page-banner */
}
.banner-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.banner-logo img { height: 60px; width: auto; border-radius: 4px; }
.banner-text { flex-grow: 1; text-align: center; padding: 0 2rem; }
.banner-text h1 { font-size: 2.2rem; color: #f3b22b; margin-bottom: 0.5rem; }
.banner-text p { font-size: 1.1rem; opacity: 0.9; }

.btn-connexion-banner {
  background-color: #f3b22b; color: #2c353d; padding: 0.8rem 1.5rem; border: none; border-radius: 5px;
  font-weight: bold; font-size: 0.95rem; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.btn-connexion-banner:hover { background-color: #e5a823; transform: translateY(-2px); }

/* --- LAYOUT --- */
.layout-container { display: flex; max-width: 1400px; margin: 3rem auto; padding: 0 1.5rem; gap: 2rem; align-items: flex-start; }

/* ==========================================
   LA SIDEBAR
   ========================================== */
.sidebar-verticale {
  width: 280px; background: #eef7fb; border-radius: 12px; padding: 1.5rem 1rem;
  display: flex; flex-direction: column; gap: 0.4rem; position: sticky; top: 20px; 
  border: 2px solid #f3b22b; box-shadow: 0 8px 25px rgba(243, 178, 43, 0.15); 
}

.sidebar-title { 
  font-size: 0.8rem; text-transform: uppercase; color: #b8860b; font-weight: 800; letter-spacing: 1.2px; 
  margin-top: 1rem; margin-bottom: 0.5rem; padding: 0.8rem 1rem;
  background: #fdf5e6; border-top: 5px solid #e5a823; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); 
}
.sidebar-title:first-child { margin-top: 0; }

.btn-sidebar {
  display: flex; align-items: center; gap: 0.8rem; width: 100%; padding: 0.9rem 1rem; text-align: left; 
  background: transparent; color: #2c353d; text-decoration: none; border-radius: 8px; font-weight: 600; 
  transition: all 0.25s ease; font-size: 0.95rem; position: relative; border-left: 4px solid transparent; 
}
.btn-sidebar:hover { background: #fdf5e6; color: #b8860b; border-left-color: #f3b22b; transform: translateX(3px); }

/* ==========================================
   LES CARTES
   ========================================== */
.zone-cartes { flex-grow: 1; }
.cartes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; align-items: start; }

.carte-etape {
  background: #eef7fb; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  display: flex; flex-direction: column; overflow: hidden; 
  transition: transform 0.3s ease, box-shadow 0.3s ease; 
  border-top: 5px solid #e5a823; grid-column: span 1; 
}
.carte-etape:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.carte-etape.ouverte { grid-column: 1 / -1; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

.carte-header { padding: 1.8rem 1.5rem 0.8rem 1.5rem; text-align: center; }
.carte-header h3 { margin: 0 0 0.8rem 0; font-size: 1.3rem; color: #2c353d; line-height: 1.2; font-weight: 700; }
.carte-date { background: #2c353d; color: #ffffff; padding: 0.4rem 1.2rem; border-radius: 20px; font-size: 0.85rem; font-weight: bold; display: inline-block; letter-spacing: 0.5px; }
.carte-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.objectif-carte { font-size: 0.95rem; font-weight: 600; color: #b8860b; margin-bottom: 1.8rem; text-align: center; font-style: italic; }

/* --- VERROUILLAGE --- */
.contenu-verrouille { position: relative; min-height: 150px; flex-grow: 1; }
.contenu-floute { filter: blur(5px); opacity: 0.5; pointer-events: none; user-select: none; }
.overlay-cadenas {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: rgba(255, 255, 255, 0.2); z-index: 10; text-align: center; padding: 1rem;
}
.overlay-cadenas span { font-size: 2.5rem; margin-bottom: 0.5rem; color: #2c353d; }
.overlay-cadenas p { font-size: 0.9rem; font-weight: bold; color: #2c353d; }

.themes-list h4 { font-size: 0.85rem; color: #2c353d; text-transform: uppercase; margin-bottom: 0.8rem; border-bottom: 1px solid #eee; padding-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.themes-list ul { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.themes-list li { font-size: 0.9rem; margin-bottom: 0.5rem; padding-left: 1.2rem; position: relative; color: #555; }
.themes-list li::before { content: "•"; color: #e5a823; font-size: 1.3rem; position: absolute; left: 0; top: -3px; }

/* --- BOUTONS DES CARTES --- */
.carte-footer { margin-top: auto; padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }

.btn-debloquer-etape {
  width: 100%; padding: 1rem; border: none; border-radius: 8px; 
  font-size: 0.9rem; font-weight: bold; text-align: center;
  background: #f3b22b; color: #2c353d; cursor: pointer; display: block;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 6px rgba(243, 178, 43, 0.2);
}
.btn-debloquer-etape:hover { background: #e5a823; transform: translateY(-2px); }

.btn-acceder {
  display: none; background: #2c353d; color: #ffffff; width: 100%;
  padding: 1rem; border: none; border-radius: 8px; font-size: 0.95rem; 
  font-weight: 800; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(44, 53, 61, 0.2);
}
.btn-acceder:hover { background: #1a2026; transform: translateY(-2px); }

/* --- CONTENU DÉTAILLÉ --- */
.contenu-detaillee { display: none; background: #ffffff; padding: 2rem; border-top: 2px dashed #e0e0e0; margin-top: 1rem; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.contenu-detaillee h2 { color: #2c353d; margin-bottom: 1.5rem; font-size: 1.5rem; text-align: center; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.detail-col { background: #f9f7f1; padding: 1.5rem; border-radius: 10px; border-left: 4px solid #e5a823; }
.detail-col h3 { color: #2c353d; margin-bottom: 1rem; font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem; }
.detail-col ul { list-style: none; padding: 0; }
.detail-col li { margin-bottom: 0.8rem; padding-left: 1.5rem; position: relative; font-size: 0.95rem; }
.detail-col li::before { content: "✓"; color: #2e7d32; font-weight: bold; position: absolute; left: 0; }

/* --- MODAL DE CONNEXION --- */
.modal { display: none; position: fixed; inset: 0; background: rgba(44, 53, 61, 0.8); z-index: 9999; justify-content: center; align-items: center; padding: 1rem; }
.modal.active { display: flex; }
.modal-content { background: #ffffff; border-radius: 12px; padding: 2.5rem 2rem; max-width: 450px; width: 100%; position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.modal-close { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; font-size: 2rem; cursor: pointer; color: #2c353d; }
.modal h3 { color: #2c353d; margin-bottom: 0.5rem; text-align: center; font-size: 1.5rem; }
.modal p { text-align: center; font-size: 0.95rem; color: #666; margin-bottom: 1.5rem; }

.theme-selectionnee { background: #fdf5e6; padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; font-weight: bold; color: #b8860b; border-left: 4px solid #f3b22b; text-align: center; font-size: 0.95rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9rem; color: #2c353d;}
.form-group input { width: 100%; padding: 0.9rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.form-group input:focus { outline: none; border-color: #f3b22b; }
.btn-submit { width: 100%; background: #2c353d; color: #ffffff; padding: 1rem; border: none; border-radius: 6px; font-size: 1rem; font-weight: bold; cursor: pointer; margin-top: 1rem; text-transform: uppercase; }
.btn-submit:hover { background: #1a2026; }
.success-msg { display: none; background: #e8f5e9; color: #2e7d32; padding: 1.5rem; border-radius: 8px; text-align: center; font-weight: bold; font-size: 1.1rem; }
.error-msg { display: none; color: #d32f2f; font-size: 0.85rem; text-align: center; margin-top: 0.8rem; font-weight: bold; }

@media (max-width: 900px) {
  .banner-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .banner-text { padding: 0; }
  .layout-container { flex-direction: column; } 
  .sidebar-verticale { width: 100%; position: static; }
  .detail-grid { grid-template-columns: 1fr; }
}
/* Style pour les boutons de téléchargement PDF */
.pdf-link {
  display: inline-block;
  background-color: #ffebee; /* Fond rouge très clair */
  color: #d32f2f; /* Texte rouge */
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.85rem;
  margin-top: 10px;
  border: 1px solid #ffcdd2;
  transition: all 0.2s ease;
}

.pdf-link:hover {
  background-color: #d32f2f;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(211, 47, 47, 0.2);
}
/* ==========================================
   LE LOGO DESSINÉ EN CSS (Version corrigée)
   ========================================== */
.banner-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  width: 180px; /* Largeur fixe pour le logo */
  height: 60px;
  margin-right: 20px;
}

.logo-formation {
    position: relative;
    width: 100%;
    height: 100%;
    transform: scale(0.6); /* Réduit la taille du logo à 60% */
    transform-origin: left center; 
}

/* L'alvéole jaune */
.hex-yellow-f {
    position: absolute;
    width: 60px;
    height: 70px;
    background: linear-gradient(135deg, #ffd500 0%, #ffb700 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    left: 20px;
    top: 10px;
    z-index: 2;
}

/* Les alvéoles noires (bordures) */
.hex-border-f {
    position: absolute;
    background-color: #2c353d; 
    z-index: 1;
}
.hex-border-f::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background-color: #ffffff; 
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Positionnement des alvéoles */
.hb-1-f { left: 70px; top: 5px; transform: scale(0.8); }
.hb-2-f { left: 90px; top: 30px; transform: scale(0.9); }
.hb-3-f { left: 75px; top: 45px; transform: scale(0.6); }
.hb-4-f { left: 95px; top: 60px; transform: scale(0.5); }
.hb-5-f { left: 85px; top: 20px; transform: scale(0.4); }

/* Le texte */
.text-group-f {
    position: absolute;
    left: 35px;
    top: 25px;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.text-top-f {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #2c353d; 
    line-height: 1;
    margin-left: 5px;
    font-weight: bold;
}

.text-main-f {
    font-family: 'Caveat', cursive;
    font-size: 45px;
    color: #2c353d; 
    line-height: 0.8;
    text-shadow: 
        -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff,
        -2px 0px 0 #fff, 2px 0px 0 #fff, 0px 2px 0 #fff, 0px -2px 0 #fff;
}
/* ==========================================
   PLACEMENT ET STYLE DU LOGO IMAGE
   ========================================== */
.banner-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.banner-logo img {
  height: 90px; 
  width: auto;
  /* On enlève mix-blend-mode pour ne pas assombrir le logo */
}
/* ==========================================
   RESPONSIVE : CORRECTION POUR MOBILES
   ========================================== */
@media (max-width: 900px) {
  
  /* La bannière s'adapte à la hauteur du contenu */
  .page-banner {
    height: auto !important; 
    padding: 1.5rem 1rem;
  }

  /* On empile le logo, le texte et le bouton */
  .banner-inner { 
    flex-direction: column; 
    text-align: center; 
    gap: 1rem; 
  }

  /* Le logo reprend sa place en haut */
  .banner-logo {
    margin: 0 auto;
    display: block;
  }
  .banner-logo img {
    height: 65px;
  }

  /* Le titre est bien centré avec de l'espace */
  .banner-text {
    padding: 0;
    margin: 0.5rem 0;
  }
  .banner-text h1 {
    font-size: 1.4rem; 
    line-height: 1.2;
  }
  .banner-text p {
    font-size: 0.95rem;
  }

  /* Le bouton de connexion prend toute la largeur */
  .banner-btn {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .btn-connexion-banner {
    width: 100%; 
    justify-content: center;
    padding: 0.8rem;
    font-size: 0.95rem;
  }

  /* On gère le menu vertical (Sidebar) */
  .layout-container { 
    flex-direction: column; 
    padding: 0 1rem;
    margin: 1.5rem auto;
  } 
  .sidebar-verticale { 
    width: 100%; 
    position: static; 
    margin-bottom: 1rem;
  }

  /* Les cartes passent en une seule colonne */
  .cartes-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid { 
    grid-template-columns: 1fr; 
  }
}