/* ============================================
   VARIABLES
   ============================================ */
:root {
    /* Comprendre l'IA (gris-bleu, neutre/pédagogique) */
    --comprendre-ia-primary: #37474f;
    --comprendre-ia-secondary: #455a64;
    --comprendre-ia-light: #eceff1;
    
    /* Risques (orange-rouge, alerte) */
    --risques-primary: #ff5722;
    --risques-secondary: #ff8a65;
    --risques-light: #fbe9e7;
    
    /* Cadre asso (violet, réflexion/valeurs) */
    --comprendre-ia-complet-primary: #7e57c2;
    --comprendre-ia-complet-secondary: #9575cd;
    --comprendre-ia-complet-light: #ede7f6;
    
    /* Données (vert, protection) */
    --donnees-primary: #4caf50;
    --donnees-secondary: #81c784;
    --donnees-light: #e8f5e9;
    
    /* Prompts (orange, méthode/créativité) */
    --prompts-primary: #ff6f00;
    --prompts-secondary: #ffb300;
    --prompts-light: #fff8e1;
    
    /* enjeux-societaux (cyan, pratique/concret) */
    --enjeux-societaux-primary: #00acc1;
    --enjeux-societaux-secondary: #26c6da;
    --enjeux-societaux-light: #e0f7fa;

    /* Glossaire (jaune-vert) */
    --glossaire-primary: #9e9d24;
    --glossaire-secondary: #c0ca33;
    --glossaire-light: #f9fbe7;
    
    /* Couleurs générales */
    --accent-primary: #42a5f5;
    --accent-secondary: #64b5f6;
    --bg: #f4f6f8;
    --text-dark: #37474f;
    --text-light: #757575;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESET ET BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    color: var(--text-dark);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: white;
    box-shadow: 0 2px 4px var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

header h1 {
    font-size: 2rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

header p {
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 600;
}

.flower-link {
    display: inline-block;
    cursor: pointer;
    margin-right: 1rem;
}

.flower-decoration {
    height: 5rem;
    width: 5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background-image: url('./flower-color.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.flower-link:hover .flower-decoration {
    transform: scale(1.1);
}

/* ============================================
   MAIN
   ============================================ */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading p {
    font-size: 1.2rem;
}

/* ============================================
   SECTIONS NIVEAU 1
   ============================================ */
.section-card {
    background: white;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: box-shadow 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

.section-card:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.section-header {
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: stretch;
    gap: 0;
    transition: background-color 0.3s ease;
    user-select: none;
    background: white;
}

.section-header .section-icon {
    font-size: 1.5rem;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header h2 {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 1.25rem;
    transition: color 0.3s ease;
    color: var(--text-dark);
}

.section-header .toggle-icon {
    font-size: 1rem;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--text-dark);
}

.section-header.active .toggle-icon {
    transform: rotate(180deg);
}

/* ============================================
   COULEURS SECTIONS - ICÔNES
   ============================================ */
.section-card[data-section="comprendre-ia"] .section-icon {
    background: var(--comprendre-ia-primary);
    color: white;
}

.section-card[data-section="risques"] .section-icon {
    background: var(--risques-primary);
    color: white;
}

.section-card[data-section="comprendre-ia-complet"] .section-icon {
    background: var(--comprendre-ia-complet-primary);
    color: white;
}

.section-card[data-section="donnees"] .section-icon {
    background: var(--donnees-primary);
    color: white;
}

.section-card[data-section="prompts"] .section-icon {
    background: var(--prompts-primary);
    color: white;
}

.section-card[data-section="enjeux-societaux"] .section-icon {
    background: var(--enjeux-societaux-primary);
    color: white;
}

.section-card[data-section="glossaire"] .section-icon {
    background: var(--glossaire-primary);
    color: white;
}

/* ============================================
   COULEURS SECTIONS - HOVER & ACTIVE
   ============================================ */
.section-card[data-section="comprendre-ia"] .section-header:hover,
.section-card[data-section="comprendre-ia"] .section-header.active {
    background: var(--comprendre-ia-primary);
}

.section-card[data-section="comprendre-ia"] .section-header:hover h2,
.section-card[data-section="comprendre-ia"] .section-header:hover .toggle-icon,
.section-card[data-section="comprendre-ia"] .section-header.active h2,
.section-card[data-section="comprendre-ia"] .section-header.active .toggle-icon {
    color: white;
}

.section-card[data-section="risques"] .section-header:hover,
.section-card[data-section="risques"] .section-header.active {
    background: var(--risques-primary);
}

.section-card[data-section="risques"] .section-header:hover h2,
.section-card[data-section="risques"] .section-header:hover .toggle-icon,
.section-card[data-section="risques"] .section-header.active h2,
.section-card[data-section="risques"] .section-header.active .toggle-icon {
    color: white;
}

.section-card[data-section="comprendre-ia-complet"] .section-header:hover,
.section-card[data-section="comprendre-ia-complet"] .section-header.active {
    background: var(--comprendre-ia-complet-primary);
}

.section-card[data-section="comprendre-ia-complet"] .section-header:hover h2,
.section-card[data-section="comprendre-ia-complet"] .section-header:hover .toggle-icon,
.section-card[data-section="comprendre-ia-complet"] .section-header.active h2,
.section-card[data-section="comprendre-ia-complet"] .section-header.active .toggle-icon {
    color: white;
}

.section-card[data-section="donnees"] .section-header:hover,
.section-card[data-section="donnees"] .section-header.active {
    background: var(--donnees-primary);
}

.section-card[data-section="donnees"] .section-header:hover h2,
.section-card[data-section="donnees"] .section-header:hover .toggle-icon,
.section-card[data-section="donnees"] .section-header.active h2,
.section-card[data-section="donnees"] .section-header.active .toggle-icon {
    color: white;
}

.section-card[data-section="prompts"] .section-header:hover,
.section-card[data-section="prompts"] .section-header.active {
    background: var(--prompts-primary);
}

.section-card[data-section="prompts"] .section-header:hover h2,
.section-card[data-section="prompts"] .section-header:hover .toggle-icon,
.section-card[data-section="prompts"] .section-header.active h2,
.section-card[data-section="prompts"] .section-header.active .toggle-icon {
    color: white;
}

.section-card[data-section="enjeux-societaux"] .section-header:hover,
.section-card[data-section="enjeux-societaux"] .section-header.active {
    background: var(--enjeux-societaux-primary);
}

.section-card[data-section="enjeux-societaux"] .section-header:hover h2,
.section-card[data-section="enjeux-societaux"] .section-header:hover .toggle-icon,
.section-card[data-section="enjeux-societaux"] .section-header.active h2,
.section-card[data-section="enjeux-societaux"] .section-header.active .toggle-icon {
    color: white;
}

.section-card[data-section="glossaire"] .section-header:hover,
.section-card[data-section="glossaire"] .section-header.active {
    background: var(--glossaire-primary);
}

.section-card[data-section="glossaire"] .section-header:hover h2,
.section-card[data-section="glossaire"] .section-header:hover .toggle-icon,
.section-card[data-section="glossaire"] .section-header.active h2,
.section-card[data-section="glossaire"] .section-header.active .toggle-icon {
    color: white;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.section-content.active {
    max-height: 10000px;
}

/* ============================================
   NIVEAU 2
   ============================================ */
.niveau2-item {
    border-bottom: 1px solid var(--border);
}

.niveau2-item:last-child {
    border-bottom: none;
}

.niveau2-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: none;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.2s ease;
    user-select: none;
}

.niveau2-header h3 {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
}

.niveau2-header .toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-light);
}

.niveau2-header.active .toggle-icon {
    transform: rotate(180deg);
}

/* Couleurs niveau 2 - hover et active */
.section-card[data-section="comprendre-ia"] .niveau2-header:hover,
.section-card[data-section="comprendre-ia"] .niveau2-header.active {
    background: var(--comprendre-ia-light);
}

.section-card[data-section="risques"] .niveau2-header:hover,
.section-card[data-section="risques"] .niveau2-header.active {
    background: var(--risques-light);
}

.section-card[data-section="comprendre-ia-complet"] .niveau2-header:hover,
.section-card[data-section="comprendre-ia-complet"] .niveau2-header.active {
    background: var(--comprendre-ia-complet-light);
}

.section-card[data-section="donnees"] .niveau2-header:hover,
.section-card[data-section="donnees"] .niveau2-header.active {
    background: var(--donnees-light);
}

.section-card[data-section="prompts"] .niveau2-header:hover,
.section-card[data-section="prompts"] .niveau2-header.active {
    background: var(--prompts-light);
}

.section-card[data-section="enjeux-societaux"] .niveau2-header:hover,
.section-card[data-section="enjeux-societaux"] .niveau2-header.active {
    background: var(--enjeux-societaux-light);
}

.section-card[data-section="glossaire"] .niveau2-header:hover,
.section-card[data-section="glossaire"] .niveau2-header.active {
    background: var(--glossaire-light);
}

.niveau2-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.niveau2-content.active {
    max-height: 8000px;
}

/* ============================================
   INDICATEURS TEMPS/DIFFICULTÉ NIVEAU 2
   ============================================ */
.niveau2-header-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.niveau2-header-content h3 {
    flex: 1;
    margin: 0;
}

.niveau2-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.meta-difficulte {
    display: inline-block;
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    color: white;
}

.meta-difficulte.debutant {
    background: #4caf50;
}

.meta-difficulte.intermediaire {
    background: #ff9800;
}

.meta-difficulte.avance {
    background: #f44336;
}

.meta-temps {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
    background: var(--bg);
    color: var(--text-light);
    min-width: 4.9rem;
    text-align: center;
}

.meta-temps i {
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

/* ============================================
   LABEL ATELIER
   ============================================ */
.activite-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1;
}

.activite-label-desktop {
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-left: 0.5rem;
}

.activite-label-mobile {
    display: none;
}

.section-card[data-section="comprendre-ia"] .activite-label {
    background: var(--comprendre-ia-primary);
}

.section-card[data-section="risques"] .activite-label {
    background: var(--risques-primary);
}

.section-card[data-section="comprendre-ia-complet"] .activite-label {
    background: var(--comprendre-ia-complet-primary);
}

.section-card[data-section="donnees"] .activite-label {
    background: var(--donnees-primary);
}

.section-card[data-section="prompts"] .activite-label {
    background: var(--prompts-primary);
}

.section-card[data-section="enjeux-societaux"] .activite-label {
    background: var(--enjeux-societaux-primary);
}

.section-card[data-section="glossaire"] .activite-label {
    background: var(--glossaire-primary);
}

/* ============================================
   NIVEAU 3
   ============================================ */
.niveau3-item {
    padding: 1.5rem;
    margin: 1rem 1.5rem;
    background: white;
    border-left: 4px solid;
    border-radius: 4px;
}

.section-card[data-section="comprendre-ia"] .niveau3-item {
    border-left-color: var(--comprendre-ia-secondary);
}

.section-card[data-section="risques"] .niveau3-item {
    border-left-color: var(--risques-secondary);
}

.section-card[data-section="comprendre-ia-complet"] .niveau3-item {
    border-left-color: var(--comprendre-ia-complet-secondary);
}

.section-card[data-section="donnees"] .niveau3-item {
    border-left-color: var(--donnees-secondary);
}

.section-card[data-section="prompts"] .niveau3-item {
    border-left-color: var(--prompts-secondary);
}

.section-card[data-section="enjeux-societaux"] .niveau3-item {
    border-left-color: var(--enjeux-societaux-secondary);
}

.section-card[data-section="glossaire"] .niveau3-item {
    border-left-color: var(--glossaire-secondary);
}

.niveau3-item h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.niveau3-item h4 i {
    font-size: 1.3rem;
}

.niveau3-item table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.niveau3-item th,
.niveau3-item td {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
}

.niveau3-item th {
    background: var(--bg);
    font-weight: 600;
}

.niveau3-item tr:hover {
    background: var(--bg);
}

.contenu-principal {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contenu-principal strong {
    font-weight: 600;
}

.contenu-principal ul,
.contenu-principal ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.contenu-principal li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.contenu-principal code {
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95em;
}

/* ============================================
   ACCORDÉONS
   ============================================ */
.accordeons {
    margin-top: 1.5rem;
}

.accordeon {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.accordeon-header {
    width: 100%;
    background: white;
    border: none;
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: background-color 0.2s ease;
}

.accordeon-header:hover {
    background: var(--bg);
}

.accordeon-header i {
    transition: transform 0.3s ease;
    color: var(--text-light);
    font-size: 0.9rem;
}

.accordeon-header.active {
    background: var(--bg);
}

.accordeon-header.active i {
    transform: rotate(180deg);
}

.accordeon-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordeon-content.active {
    max-height: 3000px;
    padding: 1.25rem;
    border-top: 1px solid var(--border);
}

.accordeon-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.accordeon-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.accordeon-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

.accordeon-content p {
    margin: 0.75rem 0;
}

/* ============================================
   LIENS
   ============================================ */
.liens {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.liens li {
    margin: 0.75rem 0;
    padding-left: 1.75rem;
    position: relative;
}

.liens li::before {
    content: "\f0c1";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--text-light);
}

.liens a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.liens a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* ============================================
   CHIFFRES CLÉS
   ============================================ */
.chiffres-cles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.chiffre-item {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--risques-primary);
}

.chiffre-item .nombre {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--risques-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.chiffre-item .description {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.4;
}

.chiffre-item .source {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.chiffre-item .source a {
    color: var(--text-light);
    text-decoration: none;
}

.chiffre-item .source a:hover {
    color: var(--risques-primary);
    text-decoration: underline;
}

/* ============================================
   MÉDIAS (IMAGES ET VIDÉOS)
   ============================================ */
.medias-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.media-item {
    margin: 0;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow);
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    display: block;
}

.media-item figcaption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.media-item figcaption strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

/* ============================================
   LIGHTBOX
   ============================================ */
   
/* Liens vers images avec lightbox */
.lightbox-link {
    color: var(--accent-primary);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.lightbox-link::before {
    content: "\f03e"; /* icône image Font Awesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 0.9em;
}

.lightbox-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-top: 1rem;
    max-width: 600px;
    text-align: center;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    background: var(--accent-primary);
    color: white;
    transform: rotate(90deg);
}

/* Images biais culturels - une sous l'autre */
#content-activite-arena .medias-container {
    grid-template-columns: 1fr;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: white;
    padding: 1rem 0;
    text-align: center;
    color: var(--text-light);
    box-shadow: 0 -2px 4px var(--shadow);
    margin-top: 1rem;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-content a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.contact-short {
    display: none;
}

/* ============================================
   QUIZ - BADGE
   ============================================ */
.quiz-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1;
}

.quiz-label-desktop {
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-left: 0.5rem;
}

.quiz-label-mobile {
    display: none;
}

/* Couleurs par section */
.section-card[data-section="comprendre-ia"] .quiz-label {
    background: var(--comprendre-ia-primary);
}

.section-card[data-section="risques"] .quiz-label {
    background: var(--risques-primary);
}

.section-card[data-section="comprendre-ia-complet"] .quiz-label {
    background: var(--comprendre-ia-complet-primary);
}

.section-card[data-section="donnees"] .quiz-label {
    background: var(--donnees-primary);
}

.section-card[data-section="prompts"] .quiz-label {
    background: var(--prompts-primary);
}

.section-card[data-section="enjeux-societaux"] .quiz-label {
    background: var(--enjeux-societaux-primary);
}

.section-card[data-section="glossaire"] .quiz-label {
    background: var(--glossaire-primary);
}

/* ============================================
   QUIZ - CHECK COMPLÉTÉ (à côté du label, fond vert)
   ============================================ */
.quiz-completed-check {
    display: none;
    width: 14px;
    height: 14px;
    min-width: 14px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #4caf50;
    flex-shrink: 0;
}

.quiz-completed-check i {
    font-size: 0.5rem;
    color: white;
}

/* Version desktop : plus d'espace et alignement haut */
.quiz-completed-check-desktop {
    margin-left: 0.5rem;
    position: relative;
    top: -2px;
}

/* Version mobile : espace normal */
.quiz-completed-check-mobile {
    display: none;
    margin-left: 0.3rem;
}

/* Afficher le check quand quiz complété - desktop uniquement par défaut */
.niveau2-header.quiz-completed .quiz-completed-check-desktop {
    display: inline-flex;
}

/* ============================================
   QUIZ - CONTENU
   ============================================ */
.quiz-container {
    padding: 1.5rem;
    margin: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--comprendre-ia-primary);
}

.quiz-intro {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.quiz-intro h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.quiz-intro p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.quiz-questions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-question {
    background: var(--bg);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.quiz-question.answered {
    pointer-events: none;
}

.quiz-question.correct {
    border-left: 4px solid #4caf50;
}

.quiz-question.incorrect {
    border-left: 4px solid #f44336;
}

.quiz-question-text {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.quiz-question-number {
    background: var(--comprendre-ia-primary);
    color: white;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.quiz-option:hover {
    border-color: var(--comprendre-ia-primary);
    background: #f8f9fa;
}

.quiz-option-marker {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.quiz-option:hover .quiz-option-marker {
    border-color: var(--comprendre-ia-primary);
}

/* Option sélectionnée correcte */
.quiz-option.selected.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.quiz-option.selected.correct .quiz-option-marker {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* Option sélectionnée incorrecte */
.quiz-option.selected.incorrect {
    border-color: #f44336;
    background: #ffebee;
}

.quiz-option.selected.incorrect .quiz-option-marker {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

/* Montrer la bonne réponse quand on s'est trompé */
.quiz-option.reveal-correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.quiz-option.reveal-correct .quiz-option-marker {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* Feedback - correct = vert, incorrect = rouge */
.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    display: none;
    animation: fadeInUp 0.3s ease;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
    color: #2e7d32;
}

.quiz-feedback.incorrect {
    background: #ffebee;
    border-left: 3px solid #f44336;
    color: #c62828;
}

.quiz-feedback-icon {
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Score final du quiz */
.quiz-score {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #37474f;
    border-radius: 8px;
    text-align: center;
    color: white;
    display: none;
    animation: fadeInUp 0.4s ease;
}

.quiz-score.show {
    display: block;
}

.quiz-score-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quiz-score-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.quiz-score-text {
    font-size: 1rem;
    opacity: 0.95;
}

.quiz-score-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Bouton voir progression */
.quiz-score-progress-btn {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-score-progress-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.quiz-score-progress-btn i {
    margin-right: 0.4rem;
}

/* ============================================
   MODAL SCORE (progression globale)
   ============================================ */
.score-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.score-modal.active {
    display: flex;
}

.score-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.score-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

.score-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.score-modal-close:hover {
    background: var(--comprendre-ia-primary);
    color: white;
}

.score-modal-header {
    text-align: center;
    margin-bottom: 1rem;
}

.score-modal-header h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.score-modal-total {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--comprendre-ia-primary);
    line-height: 1;
}

.score-modal-total span {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 400;
}

.score-modal-total-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.score-modal-message {
    text-align: center;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.score-modal-message.excellent {
    background: #e8f5e9;
    color: #2e7d32;
}

.score-modal-message.good {
    background: #e3f2fd;
    color: #1565c0;
}

.score-modal-message.average {
    background: #fff3e0;
    color: #e65100;
}

.score-modal-message.needs-work {
    background: #fce4ec;
    color: #c2185b;
}

.score-modal-sections {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.score-section-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-radius: 6px;
    border-left: 3px solid var(--border);
}

.score-section-item.completed {
    border-left-color: #4caf50;
}

.score-section-item.not-started {
    opacity: 0.6;
}

.score-section-name {
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-section-name i {
    font-size: 0.8rem;
    color: var(--text-light);
}

.score-section-name i.completed {
    color: #4caf50;
}

.score-section-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.score-section-value.not-done {
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
    font-size: 0.85rem;
}

.score-modal-reset {
    width: 100%;
    padding: 0.7rem;
    background: #37474f; /* Même couleur que quiz-score */
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.score-modal-reset:hover {
    background: #f44336; /* Rouge au survol pour indiquer action destructive */
    color: white;
}

.score-modal-reset i {
    font-size: 0.8rem;
}

.score-modal-message {
    display: none !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.quiz-option.selected.incorrect {
    animation: shake 0.4s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.quiz-option.selected.correct .quiz-option-marker {
    animation: pop 0.3s ease;
}

/* ============================================
   MEDIA QUERIES - 900px
   ============================================ */
@media (max-width: 900px) {
    .chiffres-cles {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   MEDIA QUERIES - 768px
   ============================================ */
@media (max-width: 768px) {
    /* Header */
    header h1 {
        font-size: 1.7rem;
        text-align: center;   
    }
    
    header p {
        display: none;
    }
    
    /* Sections */
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .niveau3-item {
        margin: 1rem 0.5rem;
        padding: 1rem;
    }

    /* Niveau 1 - Désactiver le hover uniquement quand NON actif */
    .section-card .section-header:hover:not(.active) {
        background: white !important;
    }
    
    .section-card .section-header:hover:not(.active) h2,
    .section-card .section-header:hover:not(.active) .toggle-icon {
        color: var(--text-dark) !important;
    }

    /* Footer */
    .copyright {
        display: block;
    }
    
    .separator-1 {
        display: none;
    }
    
    /* Niveau 2 */
    .niveau2-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .niveau2-meta {
        gap: 0.5rem;
    }
    
    .meta-difficulte {
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
    }
    
    .meta-temps {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        min-width: 4.5rem;
    }
    
    .activite-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.85rem;
    }
    
    /* Labels mobile */
    .activite-label-desktop {
        display: none;
    }
    
    .activite-label-mobile {
        display: inline-block;
        margin-left: 0.25rem;
    }
    
    .niveau2-meta {
        display: flex;
    }
    
    .meta-temps {
        order: 1;
    }
    
    .meta-difficulte {
        order: 2;
    }
    
    .activite-label-mobile {
        order: 3;
    }
    
    /* Quiz labels mobile */
    .quiz-label-desktop {
        display: none;
    }
    
    .quiz-completed-check-desktop {
        display: none !important;
    }
    
    .quiz-label-mobile {
        display: inline-flex;
        order: 3;
        margin-left: 0.25rem;
    }
    
    .quiz-completed-check-mobile {
        order: 4;
    }
    
    .niveau2-header.quiz-completed .quiz-completed-check-mobile {
        display: inline-flex;
    }
    
    /* Quiz container */
    .quiz-container {
        margin: 0.75rem 0.5rem;
        padding: 1rem;
    }
    
    .quiz-question {
        padding: 1rem;
    }
    
    .quiz-option {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Score modal */
    .score-modal-content {
        padding: 1.25rem;
        margin: 1rem;
    }
    
    .score-modal-total {
        font-size: 1.75rem;
    }
    
    /* Médias */
    .medias-container {
        grid-template-columns: 1fr;
    }
    
    /* Lightbox */
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-image {
        max-height: 70vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .lightbox-caption {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        max-width: 90%;
    }
}

/* ============================================
   MEDIA QUERIES - 600px
   ============================================ */
@media (max-width: 600px) {
    .chiffres-cles {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MEDIA QUERIES - 510px
   ============================================ */
@media (max-width: 510px) {
    header h1 {
        font-size: 1.4rem;       
    }
    
    .flower-link {
        margin-right: 0;
    }

    .flower-decoration {
        height: 3rem;
        width: 3rem;
        transition: none;
    }
    
    .section-header h2 {
        padding: 0.8rem 1.25rem;
    }
    
    .contact-full {
        display: none;
    }
    
    .contact-short {
        display: inline;
    }
    
    footer {
        padding: 1rem 0;
    }
    
    .footer-content {
        font-size: 0.85rem;
    }
}

/* ============================================
   MEDIA QUERIES - 480px
   ============================================ */
@media (max-width: 480px) {
    /* Base */
    body {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Header */
    header {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }

    .header-content {
        padding: 0 12px;
        gap: 0.5rem;
    }

    header h1 {
        font-size: 1.25rem;
        letter-spacing: 0;
    }

    /* Main */
    main {
        padding: 0 10px;
    }

    /* Niveau 1 */
    .section-card {
        margin-bottom: 1rem;
        border-radius: 6px;
    }

    .section-header .section-icon {
        font-size: 1.15rem;
        min-width: 50px;
    }

    .section-header h2 {
        font-size: 1rem;
        padding: 0.7rem 0.75rem;
    }

    .section-header .toggle-icon {
        font-size: 0.85rem;
        padding: 0 0.75rem;
    }

    /* Niveau 2 */
    .niveau2-header {
        padding: 0.9rem 0.75rem;
        gap: 0.5rem;
    }

    .niveau2-header h3 {
        font-size: 0.95rem;
    }

    .niveau2-header-content {
        gap: 0.5rem;
    }

    .niveau2-meta {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .meta-temps {
        font-size: 0.7rem;
        padding: 0.15rem 0.45rem;
        min-width: 4.3rem;
    }

    .meta-difficulte {
        width: 9px;
        height: 9px;
        min-width: 9px;
        min-height: 9px;
    }

    .activite-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.8rem;
        border-radius: 5px;
    }
    
    .activite-label {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
    }

    /* Niveau 3 */
    .niveau3-item {
        margin: 0.75rem 0.25rem;
        padding: 0.85rem;
        border-left-width: 3px;
    }

    .niveau3-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        gap: 0.4rem;
    }

    .niveau3-item h4 i {
        font-size: 1.05rem;
    }

    /* Contenu principal */
    .contenu-principal {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .contenu-principal ul,
    .contenu-principal ol {
        padding-left: 1.15rem;
    }

    .contenu-principal li {
        margin: 0.35rem 0;
        line-height: 1.5;
    }

    .contenu-principal code {
        font-size: 0.85em;
        padding: 0.15rem 0.35rem;
    }

    /* Tableaux */
    .niveau3-item table {
        font-size: 0.8rem;
    }

    .niveau3-item th,
    .niveau3-item td {
        padding: 0.5rem;
    }

    /* Accordéons */
    .accordeons {
        margin-top: 1rem;
    }

    .accordeon-header {
        font-size: 0.9rem;
        padding: 0.75rem 0.85rem;
    }

    .accordeon-header i {
        font-size: 0.8rem;
    }

    .accordeon-content.active {
        padding: 0.85rem;
    }

    .accordeon-content li {
        font-size: 0.88rem;
        line-height: 1.5;
        margin: 0.35rem 0;
    }

    .accordeon-content p {
        font-size: 0.88rem;
        margin: 0.5rem 0;
    }

    .accordeon-content ul {
        padding-left: 1.15rem;
    }

    /* Liens */
    .liens li {
        font-size: 0.88rem;
        margin: 0.5rem 0;
        padding-left: 1.5rem;
    }

    .liens a {
        word-break: break-word;
    }

    /* Chiffres clés */
    .chiffres-cles {
        gap: 0.75rem;
        margin: 1rem 0;
    }

    .chiffre-item {
        padding: 1rem;
    }

    .chiffre-item .nombre {
        font-size: 1.8rem;
    }

    .chiffre-item .description {
        font-size: 0.85rem;
    }

    .chiffre-item .source {
        font-size: 0.75rem;
    }

    /* Médias */
    .medias-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }

    .media-item figcaption {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    /* Lightbox */
    .lightbox-caption {
        font-size: 0.8rem;
        padding: 0.6rem 0.85rem;
    }

    .lightbox-close {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        margin-top: 0.75rem;
    }

    .footer-content {
        font-size: 0.8rem;
        padding: 0 12px;
        line-height: 1.6;
    }

    /* Loading */
    .loading i {
        font-size: 2rem;
    }

    .loading p {
        font-size: 1rem;
    }
    
    /* Quiz */
    .quiz-label {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
    }
    
    .quiz-completed-check {
        width: 12px;
        height: 12px;
        min-width: 12px;
    }
    
    .quiz-completed-check i {
        font-size: 0.45rem;
    }
    
    .quiz-question-text {
        font-size: 0.95rem;
    }
    
    .quiz-question-number {
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 0.7rem;
    }
    
    .quiz-option {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .quiz-option-marker {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }
    
    .quiz-feedback {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .quiz-score {
        padding: 0.85rem 1rem;
    }
    
    .quiz-score-number {
        font-size: 1.3rem;
    }
    
    .quiz-score-text {
        font-size: 0.9rem;
    }
    
    .quiz-score-message {
        font-size: 0.8rem;
    }
    
    .quiz-score-progress-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.85rem;
    }
    
    /* Score modal */
    .score-modal-content {
        padding: 1rem;
    }
    
    .score-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .score-modal-total {
        font-size: 1.5rem;
    }
    
    .score-section-item {
        padding: 0.5rem 0.6rem;
    }
    
    .score-section-name {
        font-size: 0.8rem;
    }
    
    .score-section-value {
        font-size: 0.8rem;
    }
}

/* ============================================
   MEDIA QUERIES - 400px
   ============================================ */
@media (max-width: 400px) {
    header h1 {
        font-size: 1.15rem;
        letter-spacing: normal;     
    }

    .section-header h2 {
        font-size: 0.92rem;
    }

    .niveau2-header h3 {
        font-size: 0.9rem;
    }
}

/* ============================================
   MEDIA QUERIES - 381px
   ============================================ */
@media (max-width: 381px) {
    header h1 {
        font-size: 1.2rem;
        letter-spacing: normal;     
    }
}