@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@300;400;500;600;700&display=swap');

:root {
    /* Taille de base */
    font-size: 16px;
    
    /* Échelle de police */
    --ratio: 1.333;
    
    /* Tailles de police */
    --font-size-h1: calc(1.5rem * var(--ratio));
    --font-size-h2: calc(1.25rem * var(--ratio));
    --font-size-h3: calc(1rem * var(--ratio));
    --font-size-h4: calc(0.875rem * var(--ratio));
    --font-size-body: 1rem;
    --font-size-small: 0.875rem;
    
    /* Facteurs d'adaptation */
    --mobile-factor: 0.85;
    --tablet-factor: 0.9;
    
    /* Couleurs */
    --color-primary: #9F9FA9;
    --color-dark: #171717;
    --color-red: #FF2800;
    --color-green: #3EAB5E;
    --color-light: #f8f9fa;
    --font-family-header: 'Source Code Pro', monospace;
    --font-family-body: 'Source Code Pro Light', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-body);
    background: url("./commun/fond.png") center/cover no-repeat, 
                linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    background-attachment: fixed !important;
	color: #000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 5px;
    overflow-x: hidden;
    font-size: var(--font-size-body);
    line-height: 1.5;
    overflow-y: auto;
    position: relative;
}

.compact-container {
    position: relative;
    transform: translateZ(0);
    will-change: transform;
    align-self: flex-start;
    width: 100%;
    max-width: 1030px;
    margin: 0 auto;
    padding-top: 2px !important;
}

.main-content {
    position: relative;
    z-index: 1;
    margin-top: 0;
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    padding: 20px 15px 25px; /* ✅ CORRIGÉ : padding-top à 20px */
}

/* ===== STYLES DES TITRES - CORRIGÉS ===== */
h1, h2, h3, h4 {
    font-family: var(--font-family-header);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: #000;
}

/* ✅ CORRIGÉ : vw réduits pour éviter les polices trop grandes */
h1 {
    font-size: clamp(1.5rem, 3.5vw, var(--font-size-h1)); /* réduit de 5vw à 3.5vw */
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
}

h2 {
    font-size: clamp(1.3rem, 3vw, var(--font-size-h2)); /* réduit de 4.2vw à 3vw */
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
    letter-spacing: 0.25px;
}

h3 {
    font-size: clamp(1.15rem, 2.5vw, var(--font-size-h3)); /* réduit de 3.5vw à 2.5vw */
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

h4 {
    font-size: clamp(1rem, 2.2vw, var(--font-size-h4)); /* réduit de 3vw à 2.2vw */
}

/* ===== BOUTON PRÉCÉDENT ===== */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    color: white;
    padding: 12px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-body);
    transition: opacity 0.3s;
}

.btn:hover {
    opacity: 0.9;
}

/* ===== EN-TÊTE GÉNÉRIQUE POUR LES PAGES CATÉGORIES ===== */
.integrated-header-category {
    margin-bottom: 10px; /* ✅ AUGMENTÉ de 5px à 10px */
    text-align: center;
    position: relative;
    z-index: 99;
}

.header-visual-category {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    z-index: 99;
    border: 2px groove black;
    background: linear-gradient(135deg, var(--color-green) 0%, green 100%);
    padding: 20px;
    border-radius: 10px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.header-text-overlay-category {
    text-align: center;
    width: 100%;
    pointer-events: none;
    padding: 0;
    position: static;
    transform: none;
}

.header-text-overlay-category h1 {
    margin: 0 0 8px 0;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem); /* ✅ CORRIGÉ avec clamp */
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.header-text-overlay-category p {
    font-size: clamp(1rem, 2.5vw, 1.4rem); /* ✅ CORRIGÉ avec clamp */
    color: #333;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.3;
}

/* ===== TUILES DÉPLIABLES - STYLE MÉTALLIQUE ===== */
.tile-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.tile {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tile-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%) !important;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    position: relative;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    height: 60px;
    font-family: 'Source Code Pro', monospace !important;
}

.tile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 15px 15px 0 0;
}

.tile-header h2 {
    margin: 0;
    font-size: var(--font-size-h3);
    color: white !important;
    font-weight: 300 !important;
    text-shadow: none !important;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    font-family: 'Source Code Pro', monospace !important;
}

.tile-header.active {
    background: linear-gradient(135deg, #AFAFB9 0%, #272727 100%) !important;
    border-bottom: 3px solid var(--color-red);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tile-header.active h2 {
    color: #FFF !important;
    font-weight: 400 !important;
}

.tile-icon {
    font-size: 1.2em;
    color: white !important;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

.tile-header.active .tile-icon {
    transform: rotate(180deg);
    color: var(--color-red) !important;
    font-weight: 400;
}

.tile-header:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tile-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: white;
}

.tile-content-inner {
    padding: 0 20px;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.tile-content.active {
    max-height: 1000px;
}

.tile-content.active .tile-content-inner {
    opacity: 1;
    padding: 20px;
}

.tile-content .sanction-line {
    margin-bottom: 12px !important;
}

.tile-content .legal-reference {
    margin: 2px 0 !important;
}

.tile-content .sanction-detail {
    margin-bottom: 20px !important;
    color: #666;
    font-style: italic;
}

.tile-content .highlight-red {
    color: var(--color-red);
    font-weight: bold;
    display: inline-block;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 40, 0, 0.05);
    border-radius: 5px;
}

.tile-content .amende-line {
    display: inline !important;
    white-space: nowrap;
}

.tile-content .big-letter {
    display: inline-block;
    font-size: 1.8em;
    font-weight: bold;
    color: red;
    text-shadow: 1px 1px 0 #000, 
                -1px -1px 0 #000, 
                1px -1px 0 #000, 
                -1px 1px 0 #000;
    padding: 0 5px;
    margin: 0 2px;
    vertical-align: baseline;
}

.tile-content small {
    display: block;
    margin-top: 15px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    text-align: justify;
    padding: 15px;
    background: var(--color-light);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
}

.tile-content a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.tile-content a:hover {
    color: var(--color-red);
    text-decoration: underline;
}

.with-bullet::before {
    content: "• ";
    color: #000;
    font-size: 1.2em;
    margin-right: 8px;
}
/* ===== CONTENEUR IMAGE FIXE ET QUESTION ===== */
.fixed-image-question-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 0 10px;
}

.fixed-image-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.image-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.fixed-weapon-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* ===== SECTION QUESTION ===== */
.question-section {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.card-info-fixed {
    margin-bottom: 10px;
}

.card-info-fixed h4 {
    font-size: var(--font-size-h3);
    font-weight: 500;
    color: var(--color-dark);
    margin: 0;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    padding: 15px;
    background: linear-gradient(135deg, rgba(159, 159, 169, 0.1) 0%, rgba(23, 23, 23, 0.05) 100%);
    border-radius: 10px;
    border: 1px solid rgba(159, 159, 169, 0.3);
}

/* ===== CONTENEUR BOUTONS ===== */
.choice-buttons-container {
    width: 100%;
    max-width: 500px;
    margin-top: 10px;
}

.choice-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* ===== BOUTONS MÉTALLIQUES (selon charte graphique) ===== */
.metal-choice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 16px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-family: 'Source Code Pro', monospace;
    
    /* Style métallique identique aux tuiles */
    background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.1);
    
    /* Effet 3D amélioré */
    transform: perspective(500px) translateZ(0);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

/* Effet de lumière/reflet métallique comme les tuiles */
.metal-choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 12px 12px 0 0;
}

/* Ombre intérieure pour effet pressé */
.metal-choice-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.05) 50%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 0 0 12px 12px;
}

.btn-text {
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateZ(20px);
    display: block;
    will-change: transform;
}

/* Effet au survol - effet 3D */
.metal-choice-btn:hover {
    transform: perspective(500px) translateZ(15px) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4),
                0 10px 30px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.metal-choice-btn:active {
    transform: perspective(500px) translateZ(0) translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* BOUTON ACTIF */
.metal-choice-btn.active {
    background: linear-gradient(135deg, #AFAFB9 0%, #272727 100%) !important;
    border-bottom: 3px solid var(--color-red);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===== RESPONSIVE DESIGN POUR LA NOUVELLE STRUCTURE ===== */
@media (max-width: 768px) {
    .fixed-image-question-container {
        gap: 15px;
        margin-top: 15px;
    }
    
    .fixed-image-wrapper,
    .question-section,
    .choice-buttons-container {
        max-width: 400px;
    }
    
    .card-info-fixed h4 {
        font-size: calc(var(--font-size-h3) * 0.9);
        padding: 12px;
    }
    
    .choice-buttons {
        gap: 15px;
    }
    
    .metal-choice-btn {
        min-width: 110px; /* Réduit de 120px */
        padding: 14px 20px; /* Réduit de 25px */
        font-size: 1rem; /* Réduit de 1.1rem */
        transform: perspective(300px) translateZ(0);
    }
    
    .metal-choice-btn:hover {
        transform: perspective(300px) translateZ(10px) translateY(-2px);
    }
}

@media (max-width: 480px) {
    .fixed-image-question-container {
        gap: 12px;
        margin-top: 12px;
        padding: 0 5px;
    }
    
    .fixed-image-wrapper,
    .question-section,
    .choice-buttons-container {
        max-width: 100%;
    }
    
    .card-info-fixed h4 {
        font-size: calc(var(--font-size-h3) * 0.8);
        padding: 10px;
        margin-bottom: 5px;
    }
    
    /* IMPORTANT: Garder les boutons sur une seule ligne */
    .choice-buttons {
        flex-direction: row; /* Changé de column à row */
        gap: 10px; /* Réduit l'espace */
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap; /* Empêcher le retour à la ligne */
        width: 100%;
    }
    
    .metal-choice-btn {
        min-width: 90px; /* Réduit */
        width: 48%; /* Prend presque la moitié de la largeur */
        max-width: 140px; /* Limite maximum */
        padding: 12px 15px; /* Réduit */
        font-size: 0.95rem; /* Réduit */
        border-radius: 10px; /* Légèrement plus petit */
        transform: perspective(250px) translateZ(0);
    }
    
    .btn-text {
        transform: translateZ(15px);
    }
    
    .metal-choice-btn:hover {
        transform: perspective(250px) translateZ(8px) translateY(-2px);
    }
}

@media (max-width: 360px) {
    .choice-buttons {
        gap: 8px;
    }
    
    .metal-choice-btn {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

@media (max-width: 320px) {
    .card-info-fixed h4 {
        font-size: calc(var(--font-size-h3) * 0.75);
    }
    
    .choice-buttons {
        gap: 6px;
    }
    
    .metal-choice-btn {
        min-width: 70px;
        padding: 9px 10px;
        font-size: 0.85rem;
    }
}

/* Pour les très petits écrans en orientation paysage */
@media (max-width: 768px) and (orientation: landscape) {
    .choice-buttons {
        gap: 20px;
    }
    
    .metal-choice-btn {
        min-width: 100px;
        padding: 12px 20px;
    }
}


/* ===== RESPONSIVE DESIGN POUR LES TUILES ===== */
@media (max-width: 768px) {
    .tile-container {
        gap: 12px;
    }
    
    .tile-header {
        padding: 16px 18px;
        height: 55px;
        border-radius: 12px;
    }
    
    .tile-header h2 {
        font-size: calc(var(--font-size-h3) * 0.9);
    }
    
    .tile-content.active .tile-content-inner {
        padding: 16px 18px;
    }
    
    .tile-content .big-letter {
        font-size: 1.6em;
    }
    
    .amende-line {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .tile-container {
        gap: 10px;
    }
    
    .tile-header {
        padding: 14px 16px;
        height: 50px;
        border-radius: 10px;
    }
    
    .tile-header h2 {
        font-size: calc(var(--font-size-h3) * 0.85);
    }
    
    .tile-content.active .tile-content-inner {
        padding: 14px 16px;
    }
    
    .tile-content .big-letter {
        font-size: 1.4em;
    }
    
    .tile-content small {
        font-size: 0.8em;
        padding: 10px;
    }
}
/* Styles pour les liens */
.tile-content a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.tile-content a:hover {
    color: var(--color-red);
    text-decoration: underline;
}

/* Puces */
.with-bullet::before {
    content: "• ";
    color: #000;
    font-size: 1.2em;
    margin-right: 8px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .compact-container {
        max-width: 95%;
    }
    
    .header-visual-category {
        max-width: 450px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .compact-container {
        padding-top: 2px !important; /* GARDE le même padding */
        max-width: 100%;
    }
    
    .main-content {
        padding: 0px 10px 15px;
        border-radius: 14px;
    }
    
    .header-visual-category {
        max-width: 90%;
        padding: 15px;
        min-height: 120px;
    }
    
    .header-text-overlay-category h1 {
        font-size: 1.8rem;
    }
    
    .header-text-overlay-category p {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px;
        font-size: calc(var(--font-size-body) * 0.9);
    }
    
    .tile-container {
        gap: 12px;
        margin-top: 15px;
    }
    
    .tile-header {
        padding: 16px 18px;
    }
    
    .tile-header h2 {
        font-size: calc(var(--font-size-h3) * 0.9);
    }
    
    .tile-content.active .tile-content-inner {
        padding: 16px 18px;
    }
    
    .tile-content .big-letter {
        font-size: 1.6em;
    }
    
    .amende-line {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .compact-container {
        padding-top: 2px !important;
    }
    
    .main-content {
        padding: 0px 8px 12px;
        border-radius: 12px;
    }
    
    .header-visual-category {
        max-width: 95%;
        padding: 12px;
        min-height: 100px;
    }
    
    .header-text-overlay-category h1 {
        font-size: 1.5rem;
    }
    
    .header-text-overlay-category p {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: calc(var(--font-size-body) * 0.85);
    }
    
    .tile-container {
        gap: 10px;
    }
    
    .tile-header {
        padding: 14px 16px;
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    }
    
    .tile-header.active {
        background: linear-gradient(135deg, rgba(159, 159, 169, 0.9) 0%, rgba(23, 23, 23, 0.95) 100%);
    }
    
    .tile-header h2 {
        font-size: calc(var(--font-size-h3) * 0.85);
    }
    
    .tile-content.active .tile-content-inner {
        padding: 14px 16px;
    }
    
    .tile-content .big-letter {
        font-size: 1.4em;
    }
    
    .tile-content small {
        font-size: 0.8em;
        padding: 10px;
    }
}

@media (max-width: 360px) {
    .header-visual-category {
        padding: 10px;
        min-height: 90px;
    }
    
    .header-text-overlay-category h1 {
        font-size: 1.3rem;
    }


    
    .header-text-overlay-category p {
        font-size: 0.85rem;
    }
    
    .tile-header h2 {
        font-size: calc(var(--font-size-h3) * 0.8);
    }
    
    .tile-content .big-letter {
        font-size: 1.2em;
    }
}

@media (max-width: 320px) {
    .header-visual-category {
        padding: 8px;
        min-height: 80px;
    }
    
    .header-text-overlay-category h1 {
        font-size: 1.2rem;
    }
    
    .header-text-overlay-category p {
        font-size: 0.8rem;
    }
}

/* Empêcher le saut pendant les animations */
.tile-content {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height;
}

/* FORCER le navigateur à garder l'espace */
.tile {
    contain: content; /* Empêche les effets de débordement */
}

/* S'assurer que le body ne bouge pas */
body {
    overflow-anchor: none; /* Désactive l'ancrage de défilement */
}

/* Optimisation pour mobile */
@media (prefers-reduced-motion: reduce) {
    .tile-content {
        transition: none;
    }
}
/* Texte d'avertissement en rouge simple */
.red-warning-text {
        color: #FF2800 !important;
        color: var(--color-red) !important;
        font-weight: 600 !important;
        font-size: 1.1rem !important;
        margin: 15px 0 !important;
        padding: 0 !important;
        text-align: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        font-style: italic !important;
        text-shadow: none !important;
        display: block !important;
    }
/* Pour qu'il soit bien visible sur mobile aussi */
@media (max-width: 768px) {
    .red-warning-text {
        font-size: 1rem;
        margin: 12px 0;
        padding: 6px 0;
    }
}
/* Style pour l'info-box avec GIF */
.info-box-gif {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    background-color: #f5f5f5; /* Fond gris clair */
    background-color: rgba(245, 245, 245, 0.9); /* Version avec transparence */
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    margin: 10px 0;
    color: #333;
    line-height: 1.5;
    position: relative;
    padding-left: 50px;
    cursor: default; /* Pas de curseur de lien */
}

/* Icône GIF */
.info-box-gif::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('../images/info.gif') center/contain no-repeat;
}

/* Effet hover très subtil (optionnel) */
.info-box-gif:hover {
    background-color: #f0f0f0; /* Gris légèrement plus fonde au survol */
    background-color: rgba(240, 240, 240, 0.95);
}

/* Contenu texte */
.info-box-content {
    flex: 1;
}
 /* Style pour le lien avec icône info et fond gris */
    .info-box-link {
        display: flex;
        align-items: flex-start;
        padding: 12px 15px;
        background-color: #f5f5f5;
        background-color: rgba(245, 245, 245, 0.9);
        border-radius: 8px;
        border-left: 4px solid var(--color-primary);
        margin: 10px 0;
        text-decoration: none;
        color: #333;
        transition: all 0.3s ease;
        line-height: 1.5;
    }
    
    .info-box-link:hover {
        background-color: #e8e8e8;
        background-color: rgba(232, 232, 232, 0.95);
        color: #0066cc;
        text-decoration: underline;
    }
    
    /* Icône info */
    .info-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        width: 24px;
        height: 24px;
        margin-right: 12px;
        margin-top: 2px;
        flex-shrink: 0;
        font-size: 16px;
        color: var(--color-primary);
        background: white;
        border-radius: 50%;
        border: 1px solid var(--color-primary);
    }
    
    /* Version avec image GIF */
    .info-box-link.with-gif {
        position: relative;
        padding-left: 50px;
    }
    
    .info-box-link.with-gif::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        background: url('../images/info.gif') center/contain no-repeat;
    }
    
    /* Pour mobile */
    @media (max-width: 768px) {
        .info-box-link {
            padding: 10px 12px;
            font-size: 0.95rem;
        }
        
        .info-icon {
            width: 20px;
            height: 20px;
            margin-right: 10px;
            font-size: 14px;
        }
        
        .info-box-link.with-gif {
            padding-left: 45px;
        }
        
        .info-box-link.with-gif::before {
            left: 12px;
            width: 20px;
            height: 20px;
        }
    }
    
    @media (max-width: 480px) {
        .info-box-link {
            padding: 8px 10px;
            font-size: 0.9rem;
        }
        
        .info-icon {
            width: 18px;
            height: 18px;
            margin-right: 8px;
            font-size: 12px;
        }
        
        .info-box-link.with-gif {
            padding-left: 40px;
        }
        
        .info-box-link.with-gif::before {
            left: 10px;
            width: 18px;
            height: 18px;
        }
    }
/* Surcharge de la couleur pour Catégorie C */
        .header-visual-category {
            background: linear-gradient(135deg, #F40B0B 0%, #C80909 100%) !important;
        }
    /* FORCER le texte en rouge*/
    .red-warning-text {
        color: #FF2800 !important;
        color: var(--color-red) !important;
        font-weight: 600 !important;
        font-size: 1.1rem !important;
        margin: 15px 0 !important;
        padding: 0 !important;
        text-align: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        font-style: italic !important;
        text-shadow: none !important;
        display: block !important;
    }
    
    /* Annuler spécifiquement le style .highlight-red qui serait appliqué */
    .tile-content .red-warning-text {
        background: none !important;
        border-left: none !important;
        padding: 0 !important;
        margin: 15px 0 !important;
        color: #FF2800 !important;
    }
    
    /* Style pour les images */
    .category-image {
        display: block;
        margin: 20px auto;
        width: 50%;
        max-width: 300px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .category-image-small {
        display: block;
        margin: 20px auto;
        width: 20%;
        max-width: 80px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);	
    }
	.category-image-large {
        display: block;
        margin: 20px auto;
        width: 80%;
        max-width: 500px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    /* Style pour la séparation et le bouton */
    .sanctions-section {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 3px solid #ccc;
        text-align: center;
        width: 100%;
    }
    
    .sanction-button {
        display: block;
        width: 40%;
        max-width: 300px;
        margin: 30px auto;
        padding: 20px 15px;
        background-color: white;
        color: #F52727!important;
        border: 3px solid #F52727!important;
        border-radius: 12px;
        font-size: 1.3rem;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    .sanction-button:hover {
        background-color: #C4C4C4;
        color: black;
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }
    
    .sanction-button:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Adaptation mobile pour le bouton */
    @media (max-width: 768px) {
        .sanction-button {
            width: 80%;
            font-size: 1.1rem;
            padding: 18px 12px;
        }
        
        .category-image {
            width: 80%;
            max-width: 250px;
        }
    }
/* DEUX IMAGES EN LIGNE DANS FLEXBOX*/
       
    .images-container {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 25px;
        margin-bottom: 20px;
        justify-content: center;
    }
    
    .image-item {
        flex: 0 0 calc(50% - 7.5px); /* Deux images par ligne sur desktop */
        max-width: calc(50% - 7.5px);
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }
    
    .image-item img {
        width: 75%; /* L'image prend 100% du conteneur image-item */
        max-width: 75%;
        height: auto;
        aspect-ratio: auto /* Garder un ratio cohérent */
        object-fit: cover; /* Couvrir l'espace sans déformation */
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border: 2px solid #e0e0e0;
    }
    
    .image-caption {
        margin-top: 8px;
        font-size: 0.85rem;
        color: #666;
        text-align: center;
        font-style: italic;
        width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
/* Adaptation pour mobile - Version optimisée */
@media (max-width: 768px) {
    .legal-reference-container {
        gap: 10px !important;
        padding: 10px !important;
    }
    
    .legal-reference-container img {
        max-width: 60px !important;
        height: auto !important;
    }
    
    .legal-reference {
        font-size: 0.9rem !important;
        min-width: 150px !important;
        padding: 0 5px !important;
    }
}

/* Pour très petits écrans */
@media (max-width: 480px) {
    .legal-reference-container {
        gap: 8px !important;
    }
    
    .legal-reference-container img {
        max-width: 50px !important;
    }
    
    .legal-reference {
        font-size: 0.85rem !important;
        min-width: 120px !important;
    }
}

/* Pour les écrans ultra-compacts */
@media (max-width: 360px) {
    .legal-reference-container {
        gap: 5px !important;
        margin: 15px 0 !important;
    }
    
    .legal-reference-container img {
        max-width: 40px !important;
    }
    
    .legal-reference {
        font-size: 0.8rem !important;
        min-width: 100px !important;
    }
}

/* Pour empêcher le retour à la ligne */
.legal-reference-container {
    flex-wrap: nowrap !important;
    overflow-x: auto !important; /* Permet le défilement horizontal si nécessaire */
    -webkit-overflow-scrolling: touch !important; /* Pour un défilement fluide sur iOS */
}

/* S'assurer que les images ne dépassent pas */
.legal-reference-container img {
    object-fit: contain !important;
}
    /* Assurer que le bouton sanctions reste visible */
    .sanctions-section {
        margin-top: 30px;
        padding-top: 20px;
        position: relative;
        z-index: 10;
    }
    /* DEUX PETITES IMAGES EN LIGNE DANS FLEXBOX */
.mini-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    justify-content: center;
    align-items: center;
}

.mini-image-item {
    flex: 0 0 calc(50% - 5px); /* Deux images par ligne */
    max-width: calc(50% - 5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.mini-image-item img {
    width: 20% !important; /* Images à 20% du conteneur */
    max-width: 20% !important;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain; /* Ajustement pour petites images */
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border: 1px solid #ddd;
    padding: 2px;
    background: white;
}

.mini-image-caption {
    margin-top: 5px;
    font-size: 0.75rem;
    color: #555;
    text-align: center;
    font-style: italic;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
    line-height: 1.2;
}

/* Adaptation pour mobile */
@media (max-width: 768px) {
    .mini-images-container {
        gap: 8px;
        margin-top: 12px;
        margin-bottom: 12px;
    }
    
    .mini-image-item {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
    }
    
    .mini-image-item img {
        width: 25% !important; /* Légèrement plus grand sur mobile pour la visibilité */
        max-width: 25% !important;
        border-radius: 5px;
    }
    
    .mini-image-caption {
        font-size: 0.7rem;
        margin-top: 3px;
    }
}

@media (max-width: 480px) {
    .mini-images-container {
        gap: 6px;
    }
    
    .mini-image-item img {
        width: 30% !important; /* Encore un peu plus grand sur très petits écrans */
        max-width: 30% !important;
        border-radius: 4px;
    }
    
    .mini-image-caption {
        font-size: 0.65rem;
    }
}

/* Pour les très petits écrans */
@media (max-width: 360px) {
    .mini-images-container {
        gap: 4px;
    }
    
    .mini-image-item {
        flex: 0 0 calc(50% - 2px);
        max-width: calc(50% - 2px);
    }
    
    .mini-image-caption {
        font-size: 0.6rem;
    }
}

/* Version horizontale pour orientation paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .mini-images-container {
        gap: 10px;
    }
    
    .mini-image-item img {
        width: 20% !important;
        max-width: 20% !important;
    }
}
/* ===== BOUTON PRÉCÉDENT UNIFORME ===== */
.back-button-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1000;
}

.back-btn {
	opacity:0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Effet de brillance métallique */
.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    border-radius: 8px 8px 0 0;
    pointer-events: none;
}

.back-btn:hover {
    background: linear-gradient(135deg, #AFAFB9 0%, #272727 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.back-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Style de la flèche de retour (pas une croix !) */
.back-arrow {
    display: block;
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 2;
}

/* Flèche simple vers la gauche */
.back-arrow::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    top: 5px;
    left: 8px;
    border-left: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(45deg);
}

/* Version texte cachée par défaut */
.back-btn .btn-text {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .back-button-container {
        top: 12px;
        left: 12px;
    }
    
    .back-btn {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 768px) {
    .back-button-container {
        top: 10px;
        left: 10px;
    }
    
    .back-btn {
        width: 40px;
        height: 40px;
        border-radius: 6px;
    }
    
    .back-arrow::before {
        width: 12px;
        height: 12px;
        top: 4px;
        left: 7px;
        border-left: 2.5px solid white;
        border-bottom: 2.5px solid white;
    }
}

@media (max-width: 480px) {
    .back-btn {
        width: 38px;
        height: 38px;
    }
    
    .back-arrow::before {
        width: 10px;
        height: 10px;
        top: 5px;
        left: 7px;
    }
}

/* Support tactile */
@media (hover: none) and (pointer: coarse) {
    .back-btn:hover {
        transform: none;
        background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
    }
    
    .back-btn:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #AFAFB9 0%, #272727 100%);
    }
}
/* ===== MEDIA QUERIES RESPONSIVE - AJOUTS POUR REDMI 14 ===== */

/* ✅ NOUVEAU : Tablettes et grands mobiles (481px-768px) - REDMI 14 */
@media (max-width: 768px) and (min-width: 481px) {
    .main-content {
        padding: 15px 12px 20px;
    }
    
    .integrated-header-category {
        margin-bottom: 8px;
    }
    
    .header-visual-category {
        min-height: 130px;
        padding: 15px;
    }
    
    /* ✅ POLICES CONTRÔLÉES POUR GRANDS MOBILES */
    h1 {
        font-size: clamp(1.4rem, 2.8vw, 1.8rem);
    }
    
    h2 {
        font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    }
    
    h3 {
        font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    }
    
    h4 {
        font-size: clamp(1rem, 2vw, 1.3rem);
    }
    
    .header-text-overlay-category h1 {
        font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    }
    
    .header-text-overlay-category p {
        font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    }
    
    .tile-header {
        padding: 15px 18px;
        height: 55px;
    }
    
    .metal-choice-btn {
        min-width: 115px;
        padding: 14px 22px;
        font-size: 1.05rem;
    }
    
    .back-button-container {
        top: 12px;
        left: 12px;
    }
    
    .back-btn {
        width: 42px;
        height: 42px;
    }
}

/* Petits mobiles - Ajustements supplémentaires */
@media (max-width: 480px) {
    .main-content {
        padding: 12px 10px 18px;
    }
    
    .integrated-header-category {
        margin-bottom: 6px;
    }
    
    .header-visual-category {
        min-height: 110px;
        padding: 12px;
    }
    
    h1 {
        font-size: clamp(1.3rem, 3vw, 1.6rem);
    }
    
    h2 {
        font-size: clamp(1.15rem, 2.8vw, 1.4rem);
    }
    
    h3 {
        font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    }
    
    h4 {
        font-size: clamp(0.95rem, 2.3vw, 1.2rem);
    }
    
    .header-text-overlay-category h1 {
        font-size: clamp(1.2rem, 2.8vw, 1.6rem);
    }
    
    .header-text-overlay-category p {
        font-size: clamp(0.85rem, 2vw, 1.1rem);
    }
}

/* Très petits écrans */
@media (max-width: 320px) {
    .main-content {
        padding: 10px 8px 15px;
    }
    
    .header-visual-category {
        min-height: 95px;
        padding: 10px;
    }
}

/* Support tactile */
@media (hover: none) and (pointer: coarse) {
    .back-btn:hover {
        transform: none;
        background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
    }
    
    .back-btn:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #AFAFB9 0%, #272727 100%);
    }
}
/* ===== SOUS-TUILES STYLE FINES ===== */
.sub-tile-container {
    margin: 12px 0;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.sub-tile-header {
    padding: 8px 15px; /* Plus fin que les tuiles principales */
    background: linear-gradient(135deg, #8A8A94 0%, #2A2A2A 100%); /* Légèrement plus clair que les tuiles principales */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    position: relative;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    min-height: 35px; /* Plus fin */
    font-family: 'Source Code Pro', monospace !important;
    transition: all 0.2s ease;
}

/* Effet de lumière/reflet métallique comme les tuiles principales */
.sub-tile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 4px 4px 0 0;
}

.sub-tile-header:hover {
    background: linear-gradient(135deg, #9A9AA4 0%, #3A3A3A 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.sub-tile-header.active {
    background: linear-gradient(135deg, #9A9AA4 0%, #3A3A3A 100%) !important;
    border-bottom: 2px solid var(--color-red); /* Bande rouge plus fine */
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sub-tile-header span {
    color: white !important;
    font-size: 0.95rem; /* Plus petit */
    font-weight: 400;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    font-family: 'Source Code Pro', monospace !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sub-tile-icon {
    font-size: 1rem; /* Plus petit */
    color: white !important;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    font-weight: 300;
    margin-left: 10px;
}

.sub-tile-header.active .sub-tile-icon {
    transform: rotate(180deg);
    color: var(--color-red) !important;
}

.sub-tile-body {
    padding: 12px 15px;
    display: none;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.sub-tile-body.open {
    display: block;
}

/* Style spécifique pour les sous-tuiles dans les bandes colorées */
.bande-content .sub-tile-container {
    background-color: transparent;
    margin: 10px 0;
}

.bande-content .sub-tile-header {
    background: linear-gradient(135deg, #7A7A84 0%, #1A1A1A 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bande-content .sub-tile-header:hover {
    background: linear-gradient(135deg, #8A8A94 0%, #2A2A2A 100%);
}

/* Style pour les sous-sous-tuiles (imbriquées) */
.sub-tile-container .sub-tile-container {
    margin: 8px 0 8px 15px; /* Décalage vers la droite */
    border: 1px solid #d8d8d8;
    background-color: #fff;
}

.sub-tile-container .sub-tile-header {
    background: linear-gradient(135deg, #7A7A84 0%, #222222 100%);
    min-height: 32px;
    padding: 6px 12px;
}

.sub-tile-container .sub-tile-header span {
    font-size: 0.9rem;
}

.sub-tile-container .sub-tile-body {
    background-color: #f5f5f5;
    padding: 10px 12px;
}

/* ===== MEDIA QUERIES POUR SOUS-TUILES ===== */
@media (max-width: 768px) {
    .sub-tile-header {
        padding: 7px 12px;
        min-height: 32px;
    }
    
    .sub-tile-header span {
        font-size: 0.9rem;
    }
    
    .sub-tile-body {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .sub-tile-container .sub-tile-container {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .sub-tile-header {
        padding: 6px 10px;
        min-height: 30px;
    }
    
    .sub-tile-header span {
        font-size: 0.85rem;
    }
    
    .sub-tile-icon {
        font-size: 0.9rem;
    }
    
    .sub-tile-body {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .sub-tile-container .sub-tile-container {
        margin-left: 8px;
    }
}

@media (max-width: 360px) {
    .sub-tile-header {
        padding: 5px 8px;
    }
    
    .sub-tile-header span {
        font-size: 0.8rem;
    }
    
    .sub-tile-body {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

/* Support tactile */
@media (hover: none) and (pointer: coarse) {
    .sub-tile-header:hover {
        transform: none;
        background: linear-gradient(135deg, #8A8A94 0%, #2A2A2A 100%);
    }
    
    .sub-tile-header:active {
        transform: translateY(1px);
        background: linear-gradient(135deg, #9A9AA4 0%, #3A3A3A 100%);
    }
}
/* ===== AMÉLIORATIONS RESPONSIVE POUR SMARTPHONE ===== */

/* Amélioration de la lisibilité des correspondances de calibres */
@media (max-width: 768px) {
  /* Restructuration complète des lignes de calibres pour mobile */
  .calibre-ligne {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px !important;
    padding: 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
    background-color: #f9f9f9 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
  }
  
  /* Séparation visuelle entre les sections */
  .calibre-gauche,
  .calibre-centre,
  .calibre-droite {
    width: 100% !important;
    flex: none !important;
    padding: 10px !important;
    border-bottom: 1px dashed #ccc !important;
  }
  
  /* Pas de bordure pour le dernier élément */
  .calibre-droite {
    border-bottom: none !important;
  }
  
  /* Centrage des images */
  .calibre-gauche img,
  .calibre-centre-images img,
  .calibre-droite-images img {
    max-height: 100px !important;
    margin: 0 auto !important;
  }
  
  /* Les paires d'images peuvent maintenant passer en colonne si nécessaire */
  .calibre-centre-images {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
  }
  
  .calibre-centre-images img {
    max-width: 45% !important;
    flex: 0 0 auto !important;
  }
  
  .calibre-droite-images {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
  }
  
  .calibre-droite-images img {
    max-width: 45% !important;
  }
  
  /* Légendes mieux visibles */
  .calibre-caption {
    font-size: 0.85rem !important;
    margin-top: 10px !important;
    padding: 8px !important;
    background-color: #f0f0f0 !important;
    border-radius: 4px !important;
    border-left: 3px solid #666 !important;
    text-align: left !important;
  }
}

/* Amélioration pour très petits écrans */
@media (max-width: 480px) {
  .calibre-centre-images {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .calibre-centre-images img {
    max-width: 80% !important;
    max-height: 120px !important;
  }
  
  .calibre-droite-images {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .calibre-droite-images img {
    max-width: 80% !important;
  }
  
  /* Ligne de séparation plus visible */
  .calibre-gauche,
  .calibre-centre,
  .calibre-droite {
    border-bottom: 2px solid #ddd !important;
    padding: 15px 10px !important;
  }
}

/* ===== AMÉLIORATION DES FLEX-2COL POUR MOBILE ===== */
@media (max-width: 768px) {
  .flex-2col {
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
    background-color: #fafafa !important;
  }
  
  .col-image,
  .col-text {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }
  
  .col-image img {
    max-width: 80% !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  /* Séparateur optionnel entre image et texte */
  .col-image {
    border-bottom: 1px solid #eee !important;
    padding-bottom: 15px !important;
    margin-bottom: 5px !important;
  }
}

/* ===== AMÉLIORATION DES BANDES COLORÉES ===== */
@media (max-width: 768px) {
  .bande-container {
    padding: 10px !important;
    margin: 20px 0 !important;
  }
  
  .bande-jaune,
  .bande-orange,
  .bande-rouge {
    width: 8px !important; /* Plus visible sur mobile */
  }
  
  .bande-content {
    padding-right: 10px !important;
    padding-left: 15px !important;
  }
  
  /* Ajout de séparateurs entre les sous-sections */
  .bande-content > * {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .bande-content > *:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
}

/* ===== AMÉLIORATION DES SOUS-TUILES ===== */
@media (max-width: 768px) {
  .sub-tile-container {
    margin: 15px 0 !important;
  }
  
  .sub-tile-header {
    padding: 12px 15px !important;
  }
  
  .sub-tile-header span {
    font-size: 1rem !important;
    line-height: 1.4 !important;
  }
  
  .sub-tile-body {
    padding: 15px !important;
  }
  
  /* Séparation des éléments dans les sous-tuiles */
  .sub-tile-body > * {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .sub-tile-body > *:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
}

/* ===== GESTION DES IMAGES DANS LES SOUS-TUILES ===== */
@media (max-width: 768px) {
  /* Pour les paires d'images dans les sous-tuiles */
  div[style*="display: flex"][style*="flex-wrap: wrap"] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  
  div[style*="display: flex"][style*="flex-wrap: wrap"] > div {
    width: 100% !important;
    flex: none !important;
    border-bottom: 1px dashed #ccc !important;
    padding-bottom: 20px !important;
    margin-bottom: 10px !important;
  }
  
  div[style*="display: flex"][style*="flex-wrap: wrap"] > div:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Images centrées */
  div[style*="min-height: 200px"] {
    min-height: auto !important;
    padding: 15px !important;
  }
  
  div[style*="min-height: 200px"] img {
    max-width: 100% !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }
}

/* ===== INFO-FLEX AMÉLIORÉ ===== */
@media (max-width: 768px) {
  .info-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
    padding: 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background-color: #f8f8f8 !important;
  }
  
  .info-flex img.info-gif {
    align-self: center !important;
    margin-bottom: 5px !important;
  }
  
  .info-flex p {
    text-align: justify !important;
    border-top: 1px solid #ddd !important;
    padding-top: 15px !important;
  }
}

/* ===== TABLEAU RÉCAPITULATIF AMÉLIORÉ ===== */
@media (max-width: 768px) {
  div[style*="font-family: Arial"][style*="max-width: 600px"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  table {
    min-width: 300px !important;
  }
  
  th, td {
    padding: 12px 8px !important;
    font-size: 0.9rem !important;
  }
}

/* ===== SÉPARATEURS GLOBAUX POUR PLUS DE CLARTÉ ===== */
/* Ajoute des séparateurs entre les grandes sections */
.tile-body > *:not(:last-child) {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 25px;
  margin-bottom: 25px;
}

/* Sauf pour certains éléments */
.tile-body > .bande-container:last-child,
.tile-body > .sub-tile-container:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Séparation entre les correspondances */
.calibre-correspondance:not(:last-child) {
  border-bottom: 3px solid #333 !important;
  padding-bottom: 20px !important;
  margin-bottom: 30px !important;
}

/* Pour mobile, séparation encore plus marquée */
@media (max-width: 768px) {
  .calibre-correspondance:not(:last-child) {
    border-bottom: 4px solid #666 !important;
    margin-bottom: 25px !important;
  }
  
  /* Séparation entre les sous-tuiles */
  .sub-tile-container:not(:last-child) {
    margin-bottom: 25px !important;
    border-bottom: 2px solid #ccc !important;
    padding-bottom: 5px !important;
  }
}

/* ===== CORRECTION DES ÉLÉMENTS FORCÉS EN LIGNE ===== */
/* Annulation des nowrap forcés sur mobile */
@media (max-width: 768px) {
  /* Annulation de flex-wrap: nowrap pour les conteneurs d'images */
  [style*="flex-wrap: nowrap"] {
    flex-wrap: wrap !important;
  }
  
  .calibre-centre-images,
  .calibre-droite-images,
  [class*="centre-images"],
  [class*="droite-images"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  
  /* Pour les conteneurs avec style inline */
  div[style*="display: flex"][style*="flex-wrap: nowrap"] {
    flex-wrap: wrap !important;
  }
}

/* ===== AMÉLIORATION DE LA TUILE 6 (La munition, calibre et mesure) ===== */
@media (max-width: 768px) {
  #body-6 .sub-tile-container {
    margin-top: 20px !important;
  }
  
  #body-6 .info-flex {
    background-color: #e6f3ff !important;
    border-left: 4px solid #0066cc !important;
  }
  
  /* Séparation des blocs d'images */
  #body-6 div[style*="display: flex"][style*="flex-wrap: wrap"] {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
  }
}

    /* Styles supplémentaires pour la nouvelle section "Comprendre les munitions" */
    .article-text-below {
      margin: 20px 0;
      text-align: center;
      font-size: 1.1rem;
    }
    
    /* Pour les lignes d'images flexibles */
    .flex-2col, 
    div[style*="display: flex"][style*="flex-wrap: wrap"] {
      transition: all 0.3s ease;
    }
    
    /* Ajustement mobile pour les nouvelles sections d'images */
    @media (max-width: 600px) {
      div[style*="min-height: 200px"] {
        min-height: 150px !important;
        padding: 5px !important;
      }
      
      div[style*="min-height: 200px"] img {
        max-width: 90% !important;
      }
    }
    /* Ajustements pour le contenu des tuiles */
    .tile-body {
      padding: 16px 20px 20px;
      display: none;
    }
    
    .tile-body.open {
      display: block;
    }
    
    .tile-body img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
    }
    
    .info-flex {
      display: flex;
      align-items: center;
      gap: 20px;
      margin: 20px 0;
    }
    
    .info-flex img.info-gif {
      width: 60px;
      height: 60px;
      flex-shrink: 0;
    }
    
    .bande-container {
      position: relative;
      overflow: hidden;
      margin: 30px 0;
      padding: 15px;
      background: rgba(255,255,255,0.5);
      border-radius: 8px;
    }
    
    .bande-jaune {
      position: absolute;
      top: 0;
      right: 0;
      width: 5%;
      height: 100%;
      background-color: #FFD700;
      z-index: 0;
    }
    .bande-orange {
      position: absolute;
      top: 0;
      right: 0;
      width: 5%;
      height: 100%;
      background-color: #FF7905;
      z-index: 0;
    }
    
    .bande-rouge {
      position: absolute;
      top: 0;
      right: 0;
      width: 5%;
      height: 100%;
      background-color: #F52727;
      z-index: 0;
    }
    
    .bande-content {
      position: relative;
      z-index: 1;
      padding-right: 5%;
    }
    
    .big-letter {
      display: inline-block;
      font-size: 2em;
      font-weight: bold;
      text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
      padding: 0 5px;
    }
    
	.big-letter.vert {
      color: green;
    }

    .big-letter.rouge {
      color: #F52727;
    }
	
    
    .big-letter.jaune {
      color: #FFD700;

    }
    
    .big-letter.orange {
      color: #FF7905;
    }
    
    .flex-2col {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 20px;
      margin: 20px 0;
    }
    
    .col-image {
      flex: 0 0 40%;
      max-width: 400px;
    }
    
    .col-text {
      flex: 1;
      min-width: 200px;
    }
    
    /* ===== STYLES POUR LES CORRESPONDANCES DE CALIBRES ===== */
    .calibre-correspondance {
      margin: 20px 0;
    }
    
    .calibre-ligne {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      margin: 15px 0;
      padding: 5px 0;
      border-bottom: 2px solid #333;
    }
    
    .calibre-gauche {
      flex: 0 0 180px;
      display: flex;
      justify-content: center;
    }
    
    .calibre-gauche img {
      max-width: 100%;
      height: auto;
      max-height: 200px;
    }
    
    .calibre-centre {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    
    .calibre-centre-images {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
    }
    
    .calibre-centre-images img {
      max-height: 144px;
      width: auto;
      object-fit: contain;
      flex-shrink: 0;
    }
    
    .calibre-droite {
      flex: 0 0 336px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    
    .calibre-droite-images {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 5px;
      width: 100%;
    }
    
    .calibre-droite-images img {
      max-height: 108px;
      width: auto;
      object-fit: contain;
    }
    
    .calibre-caption {
      font-style: italic;
      font-size: 0.8rem;
      text-align: center;
      margin-top: 8px;
      color: #666;
      max-width: 100%;
    }
    
    /* Version mobile - tout sur une ligne avec padding minimal */
    @media (max-width: 768px) {
      .calibre-ligne {
        gap: 3px;
        padding: 3px 0;
        margin: 10px 0;
      }
      
      .calibre-gauche {
        flex: 0 0 100px;
      }
      
      .calibre-gauche img {
        max-height: 120px;
      }
      
      .calibre-centre {
        gap: 3px;
      }
      
      .calibre-centre-images img {
        max-height: 90px;
      }
      
      .calibre-droite {
        flex: 0 0 150px;
      }
      
      .calibre-droite-images img {
        max-height: 54px;
      }
      
      .calibre-caption {
        font-size: 0.65rem;
        line-height: 1.2;
      }
    }
    
    @media (max-width: 480px) {
      .calibre-gauche {
        flex: 0 0 80px;
      }
      
      .calibre-gauche img {
        max-height: 90px;
      }
      
      .calibre-centre-images img {
        max-height: 68px;
      }
      
      .calibre-droite {
        flex: 0 0 110px;
      }
      
      .calibre-droite-images img {
        max-height: 42px;
      }
      
      .calibre-caption {
        font-size: 0.55rem;
      }
    }
    
    @media (max-width: 360px) {
      .calibre-gauche {
        flex: 0 0 60px;
      }
      
      .calibre-gauche img {
        max-height: 70px;
      }
      
      .calibre-centre-images img {
        max-height: 53px;
      }
      
      .calibre-droite {
        flex: 0 0 85px;
      }
      
      .calibre-droite-images img {
        max-height: 34px;
      }
      
      .calibre-caption {
        font-size: 0.5rem;
      }
    }
    
    /* ===== STYLES POUR LES SOUS-TUILES ===== */
    .sub-tile-container {
      margin: 15px 0;
      border: 1px solid #ddd;
      border-radius: 6px;
      overflow: hidden;
    }
    
    .sub-tile-header {
      background-color: #f5f5f5;
      padding: 12px 15px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: 600;
      border-bottom: 1px solid #ddd;
      transition: background-color 0.2s;
    }
    
    .sub-tile-header:hover {
      background-color: #e9e9e9;
    }
    
    .sub-tile-header.active {
      background-color: #e0e0e0;
      border-bottom: 1px solid #ccc;
    }
    
    .sub-tile-icon {
      font-size: 1.2rem;
      transition: transform 0.3s;
    }
    
    .sub-tile-header.active .sub-tile-icon {
      transform: rotate(180deg);
    }
    
    .sub-tile-body {
      padding: 15px;
      display: none;
      background-color: #fff;
    }
    
    .sub-tile-body.open {
      display: block;
    }
    
    /* Style spécifique pour les sous-tuiles dans les bandes colorées */
    .bande-content .sub-tile-container {
      background-color: rgba(255, 255, 255, 0.7);
      margin: 10px 0;
    }
    
    .bande-content .sub-tile-header {
      background-color: rgba(255, 255, 255, 0.9);
    }
    
    .bande-content .sub-tile-header:hover {
      background-color: rgba(255, 255, 255, 1);
    }
    
    /* Ajustements pour mobile */
    @media (max-width: 600px) {
      .sub-tile-header {
        padding: 10px 12px;
        font-size: 0.95rem;
      }
      
      .sub-tile-body {
        padding: 12px;
      }
    }
  
/* ===== STYLES DE BASE POUR L'IMAGE ET LES ÉTIQUETTES ===== */

/* Le conteneur qui sert de repère pour TOUS les textes */
.conteneur-carte {
  position: relative;  /* ← CRUCIAL : sert de repère pour les éléments en absolute */
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* L'image s'adapte à la largeur du conteneur */
.conteneur-carte img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== STYLE DES ÉTIQUETTES - VERSION PC (MÉTAL) ===== */

.point-texte {
  position: absolute;  /* ← CRUCIAL : positionné par rapport à .conteneur-carte */
  
  /* Style métallique */
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
  color: white;
  
  /* Police */
  font-family: "Source Code Pro", monospace;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  
  /* Forme et dimensions */
  padding: 8px 16px;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  
  /* Ombres pour l'effet 3D métallique */
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 2px 0 rgba(255, 255, 255, 0.1) inset,
    0 -2px 0 rgba(0, 0, 0, 0.2) inset;
  
  /* Empêche le texte de passer à la ligne */
  white-space: nowrap;
  
  /* Pour les effets de brillance */
  overflow: hidden;
  
  /* Centrage du texte dans l'étiquette */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Transition douce */
  transition: all 0.2s ease;
  
  /* S'assurer que les étiquettes sont au-dessus de l'image */
  z-index: 10;
}

/* Effet de reflet métallique */
.point-texte::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  border-radius: 30px 30px 0 0;
  pointer-events: none;
  z-index: 1;
}

/* Effet d'ombre intérieure basse */
.point-texte::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 100%
  );
  border-radius: 0 0 30px 30px;
  pointer-events: none;
  z-index: 1;
}

/* Effet au survol (seulement sur PC) */
@media (hover: hover) {
  .point-texte:hover {
    transform: translateY(-2px);
    box-shadow: 
      0 6px 12px rgba(0, 0, 0, 0.3),
      0 2px 0 rgba(255, 255, 255, 0.15) inset,
      0 -2px 0 rgba(0, 0, 0, 0.25) inset;
    background: linear-gradient(135deg, #AFAFB9 0%, #272727 100%);
  }
}



/* ===== STYLE MOBILE - ÉTIQUETTES TRANSPARENTES ===== */
@media (max-width: 768px) {
  .point-texte {
    /* Style transparent */
	  opacity: 65%;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    
    /* Annulation des styles métalliques */
    background-image: none !important;
    text-shadow: none !important;
    font-family: inherit !important;
    
    /* Taille réduite */
    font-size: 0.8rem !important;
    padding: 4px 10px !important;
    
    /* Forme simplifiée */
    border-radius: 16px !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    
    /* Annulation des effets */
    letter-spacing: normal !important;
    font-weight: bold !important;
  }
  
  /* Supprimer les pseudo-éléments */
  .point-texte::before,
  .point-texte::after {
    display: none !important;
  }
  
  /* Ajustements pour très petits écrans */
  @media (max-width: 480px) {
    .point-texte {
		opacity: 65%;
      font-size: 0.7rem !important;
      padding: 3px 8px !important;
      border-radius: 14px !important;
    }
    
    /* Permettre le retour à la ligne pour les étiquettes sauf le titre */
    .point-texte:not(.titre-image) {
      white-space: normal !important;
      max-width: 90px !important;
      text-align: center !important;
      line-height: 1.2 !important;
    }
  }
  
  @media (max-width: 360px) {
	  
    .point-texte:not(.titre-image) 
	  {
		 opacity: 65%;
      font-size: 0.65rem !important;
      padding: 2px 6px !important;
      max-width: 75px !important;
    }
  }
  
  /* CORRECTION DU TITRE SUR MOBILE */
  .titre-image {
    top: -4% !important;
    font-size: 0.9rem !important;
    
    /* Forcer le centrage */
    left: 50% !important;
    transform: translateX(-50%) !important;
    
    /* Empêcher le retour à la ligne et garder une largeur adaptée */
    white-space: nowrap !important;
    max-width: none !important;
    width: auto !important;
    
    /* S'assurer que le fond s'adapte au contenu */
    display: inline-block !important;
  }
}

/* Version encore plus discrète pour tactile */
@media (max-width: 480px) and (pointer: coarse) {
  .point-texte {
	  opacity: 65%;
    background-color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #222 !important;
  }
}
/* Conteneur avec ratio */
.flexbox-correspondance {
    width: 100%;
    margin: 20px 0;
}

/* Ligne flexbox */
.flexbox-ligne {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Classes de ratio - système sur 10 */
.ratio-1 { flex: 1; }
.ratio-2 { flex: 2; }
.ratio-3 { flex: 3; }
.ratio-4 { flex: 4; }
.ratio-5 { flex: 5; }
.ratio-6 { flex: 6; }
.ratio-7 { flex: 7; }
.ratio-8 { flex: 8; }
.ratio-9 { flex: 9; }
.ratio-10 { flex: 10; }

/* Style des conteneurs d'images */
.flexbox-gauche,
.flexbox-droite {
    display: flex;
    flex-direction: column;
}

/* Style des images */
.flexbox-gauche img,
.flexbox-droite-images img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px; /* Optionnel */
}

/* Conteneur de l'image de droite */
.flexbox-droite-images {
    width: 100%;
}

/* Légende */
.flexbox-caption {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .flexbox-ligne {
        flex-direction: column;
    }
    
    .flexbox-gauche,
    .flexbox-droite {
        width: 100%;
    }
}
.separateur-discret {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent);
    margin: 30px 0;
}
.colonne-verticale {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.texte-30 {
    flex: 3; /* 30% de l'espace vertical */
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.image-70 {
    flex: 7; /* 70% de l'espace vertical */
    min-height: 0; /* Important pour le responsive */
}

.image-70 .flexbox-droite-images {
    height: 100%;
    width: 100%;
}

.image-70 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0 10px;
}

.image-padding {
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
    height: auto;
}
/* ===== SYSTÈME DE RATIOS CORRIGÉ ===== */

/* Conteneur principal */
.flexbox-correspondance {
    width: 100%;
    margin: 20px 0;
}

/* Ligne flexbox - les ratios s'appliquent au niveau des enfants directs */
.flexbox-ligne {
    display: flex !important;
    flex-direction: row !important; /* Force l'alignement horizontal */
    gap: 20px;
    align-items: stretch; /* Les enfants prennent toute la hauteur */
    width: 100%;
}

/* Classes de ratio - système sur 10 */
.ratio-1 { flex: 1 1 0% !important; width: 10% !important; }
.ratio-2 { flex: 2 1 0% !important; width: 20% !important; }
.ratio-3 { flex: 3 1 0% !important; width: 30% !important; }
.ratio-4 { flex: 4 1 0% !important; width: 40% !important; }
.ratio-5 { flex: 5 1 0% !important; width: 50% !important; }
.ratio-6 { flex: 6 1 0% !important; width: 60% !important; }
.ratio-7 { flex: 7 1 0% !important; width: 70% !important; }
.ratio-8 { flex: 8 1 0% !important; width: 80% !important; }
.ratio-9 { flex: 9 1 0% !important; width: 90% !important; }
.ratio-10 { flex: 10 1 0% !important; width: 100% !important; }

/* Conteneurs gauche et droite - reset des styles */
.flexbox-gauche,
.flexbox-droite {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0; /* Évite les débordements */
    height: auto !important;
}

/* Style des images */
.flexbox-gauche img,
.flexbox-droite-images img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
}

/* Pour la colonne avec texte + image en vertical */
.flexbox-droite {
    gap: 10px;
}

/* Images dans la colonne droite */
.flexbox-droite-images {
    width: 100%;
}

/* Légende */
.flexbox-caption {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Système de ratios verticaux pour la colonne droite */
.vertical-ratio-1 { flex: 1 1 0% !important; }
.vertical-ratio-2 { flex: 2 1 0% !important; }
.vertical-ratio-3 { flex: 3 1 0% !important; }
.vertical-ratio-4 { flex: 4 1 0% !important; }
.vertical-ratio-5 { flex: 5 1 0% !important; }
.vertical-ratio-6 { flex: 6 1 0% !important; }
.vertical-ratio-7 { flex: 7 1 0% !important; }
.vertical-ratio-8 { flex: 8 1 0% !important; }
.vertical-ratio-9 { flex: 9 1 0% !important; }
.vertical-ratio-10 { flex: 10 1 0% !important; }

/* Conteneur pour le contenu vertical dans la colonne droite */
.flexbox-vertical-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    min-height: 200px; /* Hauteur minimale pour voir les ratios */
    gap: 10px;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .flexbox-ligne {
        flex-direction: column !important;
    }
    
    .flexbox-gauche,
    .flexbox-droite {
        width: 100% !important;
        flex: none !important;
    }
    
    .flexbox-vertical-container {
        min-height: 150px;
    }
}
/* =====================================================
   RÉFÉRENCE LÉGALE
===================================================== */
.legal-reference {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 14px auto;
  padding: 6px 15px;
  background: linear-gradient(135deg, rgba(159,159,169,0.08) 0%, rgba(255,255,255,0.15) 100%);
  border-left: 4px solid #9F9FA9;
  border-right: 4px solid #9F9FA9;
  border-radius: 40px;
  max-width: 600px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
  font-family: 'Source Code Pro', monospace;
}

.legal-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
}

.legal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.legal-text {
  font-size: 0.9rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  flex-wrap: wrap;
}

.legal-text a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(159,159,169,0.1);
  border-radius: 30px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.legal-text a:hover {
  background: rgba(159,159,169,0.2);
  border-color: rgba(159,159,169,0.3);
  color: #000;
  transform: translateY(-1px);
}

.legal-text a::after {
  content: none;
}

.legifrance-badge {
  background: linear-gradient(145deg, #b0b0b8 0%, #808088 100%);
  color: white;
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
  /* Le bloc legal-reference plus compact */
  .legal-reference {
    margin: 0 auto 5px auto;
    padding: 3px 5px;
  }
/*================ Style des annotations numérotées========= */
        .note-ref {
            font-size: 1em;
            vertical-align: top;
            color: darkslateblue;
            text-decoration: none;
            font-weight: bold;
            margin: 0 3px;
        }

        /* Style des notes en bas de page */
        .notes-section {
            margin-top: 50px;
            padding-top: 20px;
            border-top: 2px solid #ccc;
        }

        .notes-section h3 {
            color: #333;
            margin-bottom: 15px;
        }

        .note-item {
			font-size: 0.8em;
            margin-bottom: 12px;
            padding-left: 35px;
            position: relative;
			text-align: right;
        }

        .note-num {
            position:relative;
            
            font-weight: bold;
            color: darkslateblue;
			text-align: right;
        }

        .back-link {
            color: #666;
            text-decoration: none;
            margin-left: 8px;
            font-size: 0.9em;
        }

        .back-link:hover {
            color: #c00;
        }
        /* Correction pour mobile : les sous-tuiles prennent toute la largeur */
@media (max-width: 768px) {
  /* Supprime l'indentation des sous-tuiles imbriquées */
  .sub-tile-container .sub-tile-container {
    margin-left: 0 !important; /* annule le décalage à droite */
  }

  /* Optionnel : réduit légèrement les marges internes pour gagner de la place */
  .sub-tile-body {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Force les conteneurs à occuper 100% de la largeur */
  .sub-tile-container,
  .sub-tile-body,
  .sub-tile-body > * {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Évite les débordements dus aux images ou tableaux */
  .sub-tile-body img,
  .sub-tile-body table {
    max-width: 100% !important;
    height: auto !important;
  }
}
.container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .compartiment {
            flex: 1 1 calc(25% - 20px);
            min-width: 200px;
            background-color: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        

        .legende {
            padding: 15px;
            text-align: center;
            font-size: 16px;
            color: #333;
            border-top: 1px solid #eee;
        }

        /* Responsive design */
        @media (max-width: 768px) {
            .compartiment {
                flex: 1 1 calc(50% - 20px);
            }
        }

        @media (max-width: 480px) {
            .compartiment {
                flex: 1 1 100%;
            }
        }
/*image à droite texte à gauche avec ratio %*/
/* Container principal */
.popup-flex-box1 {
  width: 100%;
}

.popup-flex-box1 .col-text1 > div {
  display: flex;
  align-items: center;
  gap: 4%;
  width: 100%;
}

/* Style de l'image responsive */
.popup-flex-box1 .popup-image1 {
  width: 18%; /* Base sur mobile */
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  margin-right: 10px; /* Préservé de votre style original */
	
}

/* Conteneur du texte */
.popup-flex-box1 .popup-text-container1 {
  width: 78%; /* 100% - 18% - 4% */
}

.popup-flex-box1 .popup-text-container1 p {
  margin: 0;
  text-align: justify;
  padding: 10px;
  list-style-position: inside;
}

/* Adaptation tablette */
@media (min-width: 600px) {
  .popup-flex-box1 .popup-image1 {
    width: 15%;
  }
  
  .popup-flex-box1 .popup-text-container1 {
    width: 81%;
  }
}

/* Adaptation desktop */
@media (min-width: 1024px) {
  .popup-flex-box1 .popup-image1 {
    width: 50%;
    max-width: 500px; /* L'image ne dépasse pas 100px */
  }
  
  .popup-flex-box1 .popup-text-container1 {
    width: 50%;
  }
}
/* Pour les petits écrans, réduire le padding */
@media (max-width: 600px) {
  .popup-flex-box1 .popup-text-container1 ul {
    padding-left: 20px;
  }
}

/* Petite sécurité pour les très petits écrans */
@media (max-width: 400px) {
  .popup-flex-box1 .popup-image1 {
    width: 70px; /* Passage en pixels pour éviter une image trop petite */
  }
  
  .popup-flex-box1 .popup-text-container1 {
    width: calc(100% - 70px - 4%);
  }
}
/*ECOCHE VALIDEE*/
/* CSS */
.check-badge {
  display: inline-block;
  background-color: #4CAF50;
  color: white;
  padding: 5px 10px 5px 25px;
  border-radius: 4px;
  position: relative;
  font-weight: 600; /* Épaisseur ajoutée (600 = semi-bold) */
  /* Autres options : bold, 700, 800, 900 */
}

.check-badge::before {
  content: "✓";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold; /* La coche reste en gras */
}
/* Ajoutez ces styles à votre fichier CSS */
.compartiment .image-container {
    width: 100%;
    height: 200px; /* Hauteur fixe pour toutes les images */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5; /* Fond neutre pendant le chargement */
}

.compartiment .image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* L'image entière est visible sans déformation */
    object-position: center;
    display: block;
}

/* Responsive : ajuster la hauteur sur mobile */
@media (max-width: 768px) {
    .compartiment .image-container {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .compartiment .image-container {
        height: 160px;
    }
}
.flexbox-text {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;        /* Pour les petits écrans */
}

.flexbox-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    
}

.flexbox-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Classes de taille */
.img-25 { width: 25%; }
.img-50 { width: 50%; }
.img-75 { width: 75%; }
.img-100 { width: 100%; }

/* =====================================================
   BLOCS OBSERVATION / DOSSIER TECHNIQUE
===================================================== */

/* Conteneur principal de chaque bloc */
.observation-block {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  width: 100%;
}

.observation-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Ligne principale avec image et contenu */
.observation-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
}

/* Partie gauche (image + texte d'observation) */
.observation-left {
  display: flex;
  align-items: center;
  width: 70%;
  padding-right: 15px;
}

.observation-icon {
  width: 60px;
  height: auto;
  margin-right: 15px;
  flex-shrink: 0;
}

.observation-text {
  text-align: justify;
  margin: 0;
  font-size: 1rem;
}

/* Partie droite (bloc technique) */
.technical-reference {
  margin: 0;
  width: 28%;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  background: linear-gradient(135deg, rgba(0,80,120,0.08) 0%, rgba(255,255,255,0.15) 100%);
  border-left: 4px solid #005078;
  border-right: 4px solid #005078;
  border-radius: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
  font-family: 'Source Code Pro', monospace;
}

.technical-image-container {
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  margin-right: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #005078 0%, #002538 100%);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
}

.technical-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0) invert(1);
}

.technical-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.technical-link {
  color: #005078;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 3px;
  white-space: nowrap;
}

.technical-link:hover {
  text-decoration: underline;
}

.technical-badge {
  background: linear-gradient(145deg, #005078 0%, #003049 100%);
  color: white;
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  white-space: nowrap;
}

/* Texte de conclusion après chaque bloc */
.observation-conclusion {
  text-align: justify;
  margin: 10px 0 0 0;
  padding: 10px;
  display: block;
  width: 100%;
}

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

/* Tablettes et mobiles */
@media (max-width: 768px) {
  .observation-row {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .observation-left {
    width: 100%;
    padding-right: 0;
  }
  
  .technical-reference {
    width: 100%;
    justify-content: center;
  }
  
  .observation-conclusion {
    padding: 10px 0;
  }
}

/* Petits mobiles */
@media (max-width: 480px) {
  .observation-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .observation-icon {
    margin-right: 0;
    margin-bottom: 10px;
    width: 50px;
  }
  
  .observation-text {
    text-align: center;
  }
  
  .technical-image-container {
    width: 45px;
    height: 45px;
  }
  
  .technical-link {
    font-size: 0.8rem;
  }
  
  .technical-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}

/* Très petits écrans */
@media (max-width: 360px) {
  .technical-reference {
    flex-direction: column;
    padding: 10px;
  }
  
  .technical-image-container {
    margin-right: 0;
    margin-bottom: 5px;
  }
  
  .technical-content {
    width: 100%;
  }
}
/* =====================================================
   RÉFÉRENCE LÉGALE
===================================================== */
.legal-reference {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 14px auto;
  padding: 6px 15px;
  background: linear-gradient(135deg, rgba(159,159,169,0.08) 0%, rgba(255,255,255,0.15) 100%);
  border-left: 4px solid #9F9FA9;
  border-right: 4px solid #9F9FA9;
  border-radius: 40px;
  max-width: 600px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
  font-family: 'Source Code Pro', monospace;
}

.legal-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
}

.legal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.legal-text {
  font-size: 0.9rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  flex-wrap: wrap;
}

.legal-text a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(159,159,169,0.1);
  border-radius: 30px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.legal-text a:hover {
  background: rgba(159,159,169,0.2);
  border-color: rgba(159,159,169,0.3);
  color: #000;
  transform: translateY(-1px);
}

.legal-text a::after {
  content: none;
}

.legifrance-badge {
  background: linear-gradient(145deg, #b0b0b8 0%, #808088 100%);
  color: white;
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* =====================================================
   BLOCS OBSERVATION / DOSSIER TECHNIQUE
===================================================== */

.observation-block {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  width: 100%;
}

.observation-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.observation-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
}

/* ===== PARTIE GAUCHE : IMAGE + PUCE + TEXTE ===== */
.observation-left {
  display: flex;
  align-items: flex-start;
  width: 70%;
  padding-right: 15px;
  gap: 10px; /* espace entre l'icône et le conteneur texte */
}

.observation-icon {
  width: 60px;
  height: auto;
  flex-shrink: 0;
}

.observation-text-container {
  display: flex;
  align-items: flex-start;
  gap: 10px; /* espace entre la puce et le texte */
  flex: 1;
}

.puce-observation {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.observation-text {
  margin: 0;
  text-align: justify;
  flex: 1;
}

/* ===== PARTIE DROITE : BLOC TECHNIQUE ENTIÈREMENT CLIQUABLE ===== */
a.technical-reference-link {
  display: block;
  width: 28%;
  flex-shrink: 0;
  text-decoration: none;
  margin: 0;
  transition: transform 0.3s ease;
}

a.technical-reference-link:hover {
  transform: translateY(-2px);
}

.technical-reference {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  background: #919191;
  border-left: 4px solid #005078;
  border-right: 4px solid #005078;
  border-radius: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
  font-family: 'Source Code Pro', monospace;
  transition: all 0.3s ease;
}

a.technical-reference-link:hover .technical-reference {
  
  border-left-color: #0070a8;
  border-right-color: #0070a8;
  box-shadow: 0 4px 15px rgba(0,80,120,0.3);
}

.technical-image-container {
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  margin-right: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #005078 0%, #002538 100%);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
}

.technical-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0) invert(1);
}

.technical-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.technical-content span {

  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 3px;
}

.technical-badge {
  background: linear-gradient(145deg, #005078 0%, #003049 100%);
  color: white;
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  white-space: nowrap;
}

/* ===== LIGNE DE CONCLUSION AVEC PUCE ===== */
.observation-conclusion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  text-align: justify;
  margin: 15px 0 0 0;
  padding: 10px 10px 10px 45px;
  position: relative;
  width: 100%;
}

.observation-conclusion::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: url('../images/puce.png') no-repeat center/contain;
  flex-shrink: 0;
}

/* ===== BADGES DE CATÉGORIE ===== */
.category-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #2c3e50 0%, #1a2632 100%);
  border-radius: 30px;
  padding: 4px 4px 4px 12px;
  margin: 2px 4px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  vertical-align: middle;
  font-family: 'Source Code Pro', monospace;
}

.category-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.category-number {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 8px;
  white-space: nowrap;
}

.category-number sup {
  font-size: 0.7rem;
  top: -0.3em;
}

.category-label {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .observation-row {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .observation-left {
    width: 100%;
    padding-right: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .observation-text-container {
    width: calc(100% - 70px);
  }

  a.technical-reference-link {
    width: 100%;
  }

  .observation-conclusion {
    padding-left: 40px;
  }

  .observation-conclusion::before {
    width: 24px;
    height: 24px;
    left: 5px;
  }
}

@media (max-width: 480px) {
  .observation-left {
    flex-direction: column;
    align-items: center;
  }

  .observation-icon {
    margin-bottom: 10px;
  }

  .observation-text-container {
    width: 100%;
    flex-direction: row;
  }

  .puce-observation {
    width: 20px;
    height: 20px;
  }

  .observation-conclusion {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 40px;
  }

  .category-badge {
    width: 100%;
    justify-content: space-between;
  }
}



.technical-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 28%;
  flex-shrink: 0;
}

.technical-reference {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  background: #919191;
  border-left: 4px solid #005078;
  border-right: 4px solid #005078;
  border-radius: 40px;
  width: 100%;
}

.technical-image-container {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #005078 0%, #002538 100%);
  border-radius: 50%;
}

.technical-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.technical-content span {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 3px;
}


/* ===== STYLES POUR LES BADGES TECHNIQUES EMPILÉS ===== */

/* Conteneur de la pile */
.technical-stack {
  width: 28%;
  min-width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Liens des badges - conservation du texte blanc */
.technical-stack .technical-reference-link {
  width: 100%;
  display: block;
  margin: 0;
  text-decoration: none;
  color: white;
}

.technical-stack .technical-reference-link:link,
.technical-stack .technical-reference-link:visited,
.technical-stack .technical-reference-link:hover,
.technical-stack .technical-reference-link:active,
.technical-stack .technical-reference-link:focus {
  color: white;
  text-decoration: none;
}

/* Style du badge */
.technical-stack .technical-reference {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  background: #919191;
  border-left: 4px solid #005078;
  border-right: 4px solid #005078;
  border-radius: 40px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* Effet hover du badge */
.technical-stack .technical-reference-link:hover .technical-reference {
  background: linear-gradient(135deg, #a1a1a1 0%, #818181 100%);
  border-left-color: #0070a8;
  border-right-color: #0070a8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Conteneur de l'image */
.technical-stack .technical-image-container {
  width: 55px;
  height: 55px;
  min-width: 55px;
  flex-shrink: 0;
  margin-right: 7px;
  background: linear-gradient(135deg, #005078 0%, #002538 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Image standard */
.technical-stack .technical-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0) invert(1); /* rend l'image blanche */
}

/* Image UFAA spécifique - annulation du filtre */
.technical-stack .technical-image[alt="UFAA"] {
  filter: none;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

/* Contenu texte */
.technical-stack .technical-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  flex: 1;
}

.technical-stack .technical-content span {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 3px;
  white-space: normal;
}

/* Badge "Voir le site / Voir dossier" */
.technical-stack .technical-badge {
  background: linear-gradient(145deg, #005078 0%, #003049 100%);
  color: white;
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Force supplémentaire pour le texte blanc */
.technical-stack *,
.technical-stack *:link,
.technical-stack *:visited,
.technical-stack *:hover,
.technical-stack *:active {
  color: white;
}

/* ===== STYLES SPÉCIFIQUES POUR LE BADGE UFAA (optionnel) ===== */
.technical-stack .technical-reference.ufaa-reference {
  background: linear-gradient(135deg, #6a4c9c 0%, #3a2a5a 100%);
  border-left-color: #9370db;
  border-right-color: #9370db;
}

.technical-stack .technical-reference.ufaa-reference .technical-image-container {
  background: linear-gradient(135deg, #9370db 0%, #6a4c9c 100%);
}

.technical-stack .technical-reference.ufaa-reference .technical-badge {
  background: linear-gradient(145deg, #9370db 0%, #6a4c9c 100%);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .technical-stack {
    width: 100%;
    min-width: 100%;
  }
  
  .observation-row {
    flex-direction: column;
  }
  
  .observation-left {
    width: 100%;
  }
}

/* ===== BADGE INVERSE (ROUGE) ===== */
.cross-badge {
    display: inline-block;
    background-color: rgba(255, 40, 0, 0.15); /* Rouge transparent */
    color: #c00; /* Rouge foncé pour le texte */
    padding: 5px 10px 5px 30px; /* Plus d'espace à gauche pour l'icône */
    border-radius: 4px;
    position: relative;
    font-weight: 600;
    border: 1px solid rgba(255, 40, 0, 0.3); /* Bordure discrète */
}

/* Version avec croix (✕) */
.cross-badge::before {
    content: "✕";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #c00;
    font-size: 1.1em;
}

/* Version avec cercle barré (interdit) */
.forbidden-badge {
    display: inline-block;
    background-color: rgba(255, 40, 0, 0.15);
    color: #c00;
    padding: 5px 10px 5px 40px;
    border-radius: 4px;
    position: relative;
    font-weight: 600;
    border: 1px solid rgba(255, 40, 0, 0.3);
}

.forbidden-badge::before {
    content: "⛔";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
}

/* Version alternative avec un simple cercle rouge barré (plus discret) */
.no-badge {
    display: inline-block;
    background-color: rgba(255, 40, 0, 0.15);
    color: #c00;
    padding: 5px 10px 5px 30px;
    border-radius: 4px;
    position: relative;
    font-weight: 600;
    border: 1px solid rgba(255, 40, 0, 0.3);
}

.no-badge::before {
    content: "🚫";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
}

/* Version avec juste un fond rouge clair (si vous préférez sans symbole) */
.bad-badge {
    display: inline-block;
    background-color: rgba(255, 40, 0, 0.15);
    color: #c00;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(255, 40, 0, 0.3);
}

/* ===== STYLES POUR TITRES DE RUBRIQUES ===== */

/* 1. Style métallique (comme les en-têtes de tuiles) */
.rubrique-metal {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-align: left;
    margin: 20px 0 15px 0;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.rubrique-metal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    border-radius: 30px 30px 0 0;
    pointer-events: none;
}

/* 2. Style avec bande colorée (comme les bande-container) */
.rubrique-bande {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    padding: 10px 15px 10px 25px;
    margin: 20px 0 15px 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.rubrique-bande.bleue { border-left-color: #005078; }
.rubrique-bande.rouge { border-left-color: #FF2800; }
.rubrique-bande.orange { border-left-color: #FF7905; }
.rubrique-bande.jaune { border-left-color: #FFD700; }
.rubrique-bande.verte { border-left-color: #3EAB5E; }

/* 3. Style badge (comme category-badge mais en plus grand) */
.rubrique-badge {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #2c3e50 0%, #1a2632 100%);
    border-radius: 40px;
    padding: 8px 20px 8px 20px;
    margin: 20px 0 15px 0;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.rubrique-badge.rouge { background: linear-gradient(135deg, #c00 0%, #a00 100%); }
.rubrique-badge.orange { background: linear-gradient(135deg, #FF7905 0%, #d85f00 100%); }
.rubrique-badge.vert { background: linear-gradient(135deg, #3EAB5E 0%, #2d8a47 100%); }

/* 4. Style simple avec puce (comme observation-text mais en plus gros) */
.rubrique-puce {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    padding: 5px 0 5px 35px;
    margin: 20px 0 15px 0;
    position: relative;
    border-bottom: 2px solid #e0e0e0;
}

.rubrique-puce::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('./images/puce2.png') no-repeat center/contain;
}

/* 5. Style souligné avec un filet (simple et élégant) */
.rubrique-souligne {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    padding: 0 0 8px 0;
    margin: 25px 0 15px 0;
    border-bottom: 3px solid #9F9FA9;
    position: relative;
}

.rubrique-souligne::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #FF2800;
}

/* 6. Style avec fond gris clair et bord arrondi */
.rubrique-grise {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    background: #f5f5f5;
    padding: 10px 20px;
    margin: 20px 0 15px 0;
    border-radius: 8px;
    border-left: 4px solid #9F9FA9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ===== MEDIA QUERIES POUR MOBILE ===== */
@media (max-width: 768px) {
    .rubrique-metal { font-size: 1.1rem; padding: 10px 15px; }
    .rubrique-bande { font-size: 1.1rem; }
    .rubrique-badge { font-size: 1.1rem; padding: 6px 15px; }
    .rubrique-puce { font-size: 1.1rem; padding-left: 30px; }
    .rubrique-souligne { font-size: 1.1rem; }
    .rubrique-grise { font-size: 1.1rem; padding: 8px 15px; }
}

@media (max-width: 480px) {
    .rubrique-metal { font-size: 1rem; }
    .rubrique-bande { font-size: 1rem; }
    .rubrique-badge { font-size: 1rem; }
    .rubrique-puce { font-size: 1rem; padding-left: 28px; }
    .rubrique-souligne { font-size: 1rem; }
    .rubrique-grise { font-size: 1rem; }
}
/* ===== CORRECTION MOBILE POUR BADGES ET BLOCS TECHNIQUES ===== */

@media (max-width: 768px) {
  
  /* --- CORRECTION 1 : Badges de catégorie (category-badge) --- */
  .category-badge {
    width: auto !important;               /* Annule toute largeur forcée */
    max-width: fit-content !important;    /* S'adapte au contenu */
    min-width: 0 !important;              /* Annule les min-width */
    display: inline-flex !important;      /* Garde le comportement inline */
    flex-wrap: nowrap !important;         /* Empêche le retour à la ligne */
    white-space: nowrap !important;       /* Texte sur une ligne */
    margin: 4px !important;               /* Garde une marge raisonnable */
  }
  
  /* Ajustement du texte dans le badge */
  .category-number {
    white-space: nowrap !important;
    font-size: 0.85rem !important;
  }
  
  .category-label {
    white-space: nowrap !important;
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }
  
  /* --- CORRECTION 2 : Blocs techniques (technical-reference) --- */
  .technical-reference-link {
    width: auto !important;               /* S'adapte au contenu */
    max-width: fit-content !important;
    margin: 0 auto !important;             /* Centré si nécessaire */
  }
  
  .technical-reference {
    width: auto !important;
    min-width: 200px !important;          /* Largeur minimum confortable */
    max-width: 300px !important;          /* Maximum pour ne pas déborder */
    margin: 0 auto !important;
    padding: 6px 12px !important;         /* Padding plus serré */
  }
  
  /* --- CORRECTION 3 : Conteneurs parents --- */
  .observation-row {
    justify-content: center !important;
    align-items: center !important;
  }
  
  .observation-left {
    width: 100% !important;
    text-align: center !important;
  }
  
  .technical-stack {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }
}
/* ===== BLOC VIDO MTALLIQUE ===== */

/* Conteneur principal - comme vos tuiles */
.video-metal-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  overflow: hidden;
  transition: all 0.3s ease;
  margin: 25px 0;
  width: 100%;
}

/* En-tte mtallique - identique  .tile-header */
.video-metal-header {
  padding: 18px 20px;
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%) !important;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  position: relative;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  border-radius: 15px 15px 0 0;
  height: 60px;
  font-family: 'Source Code Pro', monospace !important;
  transition: all 0.3s ease;
}

/* Effet de brillance mtallique */
.video-metal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
  border-radius: 15px 15px 0 0;
}

.video-metal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: white !important;
  font-weight: 300 !important;
  text-shadow: none !important;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  font-family: 'Source Code Pro', monospace !important;
}

.video-header-icon {
  font-size: 1.2em;
  color: white !important;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
  font-weight: 300;
}

/* tat ouvert/ferm (optionnel) */
.video-metal-container.open .video-header-icon {
  transform: rotate(180deg);
}

.video-metal-container.open .video-metal-body {
  display: block;
}

/* Corps de la vido */
.video-metal-body {
  padding: 20px;
  display: block; /* Toujours visible, ou 'none' si vous voulez plier/dpiler */
  background: #fff;
}

/* Conteneur vido */
.video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  aspect-ratio: 16 / 9; /* Format 16:9 par dfaut */
}

/* lment vido */
.metal-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Overlay avec gros bouton play */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.video-wrapper:hover .video-overlay,
.video-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Gros bouton play central */
.video-play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
  border: 3px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.video-play-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  border-radius: 50% 50% 0 0;
}

.video-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.video-play-btn .play-icon {
  position: relative;
  z-index: 2;
  margin-left: 5px; /* Dcale lgrement pour centrer le triangle */
}

/* Contrles personnaliss */
.custom-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3));
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.video-wrapper:hover .custom-video-controls {
  opacity: 1;
}

/* Boutons de contrle */
.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.control-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 6px 6px 0 0;
}

.control-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-icon,
.volume-icon,
.fullscreen-icon {
  position: relative;
  z-index: 2;
}

/* Barre de progression */
.progress-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  min-width: 100px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FF2800);
  border-radius: 3px;
  transition: width 0.1s linear;
  position: relative;
}

.progress-handle {
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  border: 2px solid #FF2800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.progress-container:hover .progress-handle {
  opacity: 1;
}

/* Affichage du temps */
.time-display {
  color: white;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.85rem;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Contrle du volume */
.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.volume-slider-container {
  width: 0;
  overflow: hidden;
  transition: width 0.3s ease;
}

.volume-container:hover .volume-slider-container {
  width: 80px;
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  border: 2px solid #FF2800;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  border: 2px solid #FF2800;
  cursor: pointer;
}

/* Lgende de la vido */
.video-caption {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(159, 159, 169, 0.08) 0%, rgba(255, 255, 255, 0.15) 100%);
  border-left: 4px solid #9F9FA9;
  border-radius: 8px;
}

.caption-badge {
  background: linear-gradient(135deg, #9F9FA9 0%, #171717 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.caption-text {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
  font-style: italic;
}

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

/* Tablette */
@media (max-width: 768px) {
  .video-metal-header {
    padding: 16px 18px;
    height: 55px;
  }
  
  .video-metal-header h3 {
    font-size: 1rem;
  }
  
  .video-metal-body {
    padding: 15px;
  }
  
  .video-play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .custom-video-controls {
    padding: 10px;
    gap: 8px;
  }
  
  .control-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .time-display {
    font-size: 0.75rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .video-metal-header {
    padding: 14px 16px;
    height: 50px;
  }
  
  .video-metal-header h3 {
    font-size: 0.9rem;
  }
  
  .video-metal-body {
    padding: 12px;
  }
  
  .video-play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  /* Adaptation des contrles sur mobile */
  .custom-video-controls {
    flex-wrap: wrap;
    padding: 8px;
    gap: 6px;
  }
  
  .control-btn {
    width: 30px;
    height: 30px;
  }
  
  .progress-container {
    order: 3;
    width: 100%;
    margin-top: 5px;
  }
  
  .time-display {
    font-size: 0.7rem;
    margin-left: auto;
  }
  
  .volume-container:hover .volume-slider-container {
    width: 60px;
  }
  
  .volume-slider {
    width: 60px;
  }
  
  .video-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .caption-text {
    font-size: 0.8rem;
  }
}

/* Trs petits crans */
@media (max-width: 320px) {
  .video-metal-header h3 {
    font-size: 0.8rem;
  }
  
  .custom-video-controls {
    padding: 5px;
  }
  
  .control-btn {
    width: 28px;
    height: 28px;
  }
}
/* Correction pour que l'overlay et le bouton soient cliquables */
.video-overlay {
  pointer-events: none; /* L'overlay lui-mme ne capture pas les clics */
}

.video-play-btn {
  pointer-events: auto; /* Mais le bouton oui ! */
  cursor: pointer;
  position: relative;
  z-index: 20;
}

/* S'assurer que le bouton est au-dessus */
.video-play-btn {
  position: relative;
  z-index: 30;
}

/* Pour le dbogage -  retirer ensuite */
.video-play-btn:active {
  transform: scale(0.9);
  background: red; /* Test visuel */
}