/* ==========================================================================
   CHARTE GRAPHIQUE FFHANDBALL - LIVRET DE L'ARBITRAGE
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES ET POLICES OFFICIELLES
   ========================================================================== */

/* --- Les Titres --- */
@font-face {
    font-family: 'Sharp Grotesk';
    src: url('../Polices/SharpGrotesk-BoldItalic15.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Sharp Grotesk';
    src: url('../Polices/SharpGrotesk-BookItalic15.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
}

/* --- Le Texte --- */
@font-face {
    font-family: 'Poppins';
    src: url('../Polices/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../Polices/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../Polices/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../Polices/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    /* --- Couleurs de la marque FFHB --- */
    --couleur-prim-bleu: #003366;    
    --couleur-prim-rouge: #ee302d;   
    --couleur-prim-jaune: #d4e157;   
    --couleur-prim-cyan: #149CD8;
    
    /* --- Couleurs de fond et d'interface --- */
    --couleur-fond-site: #f4f5f7;
    --couleur-fond-carte: #ffffff;
    --couleur-fond-remarque: transparent;
    --couleur-fond-ffhb: rgba(238, 48, 45, 0.08); 
    --couleur-fond-survol: #f0f4f8;
    
    /* --- Couleurs de texte --- */
    --couleur-texte-principal: #333333;
    --couleur-texte-secondaire: #555555;
    --couleur-texte-inverse: #ffffff;
    --couleur-bordure: #eaecf0;

    /* --- Typographie --- */
    --police-titres: 'Sharp Grotesk', 'Arial Black', sans-serif;
    --police-texte: 'Poppins', 'Arial', sans-serif;
    
    /* --- Espacements --- */
    --espace-xs: 4px;
    --espace-sm: 8px;
    --espace-md: 16px;
    --espace-lg: 24px;
    --espace-xl: 32px;
    --espace-xxl: 48px;

    /* --- Effets visuels --- */
    --rayon-sm: 4px;
    --rayon-md: 8px;
    --rayon-lg: 30px;
    --ombre-legere: 0 2px 4px rgba(0, 0, 0, 0.05);
    --ombre-moyenne: 0 4px 15px rgba(0, 0, 0, 0.1);
    --ombre-forte: 0 5px 20px rgba(0, 0, 0, 0.3);
    --transition-rapide: 0.2s ease-in-out;
}


/* ==========================================================================
   2. STRUCTURE GLOBALE ET BASE
   ========================================================================== */

body {
    background-color: var(--couleur-fond-site);
    margin: 0;
    padding: var(--espace-lg);
    font-family: var(--police-texte);
    font-weight: 400;
    color: var(--couleur-texte-principal);
    line-height: 1.6; 
}

.page-livret {
    background: var(--couleur-fond-carte);
    max-width: 900px;
    margin: 0 auto var(--espace-xl) auto;
    padding: var(--espace-xxl) 60px;
    box-shadow: var(--ombre-moyenne);
    border-radius: var(--rayon-md); 
}

/* --- Gestion globale des images --- */
.page-livret img {
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: var(--espace-lg) auto; 
    border-radius: var(--rayon-sm);
}

.lien-regle, 
.btn-installer,
#btn-retour-haut,
#btn-recherche,
#search-bar-container button,
.popup-header,
.sommaire-item a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

p, li {
    text-wrap: pretty; 
}

.titre-regle, .sous-theme, .sous-regle {
    text-wrap: pretty; 
}

@media print {
    /* Masque tout le contenu de la page */
    body {
      display: none !important
    }
  }
/* ==========================================================================
   3. TYPOGRAPHIE ET TITRES
   ========================================================================== */

.titre-regle, .titre-principal {
    font-family: var(--police-titres);
    color: var(--couleur-prim-bleu);
    font-size: 40px; 
    font-weight: 700; 
    font-style: italic;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: -7px; 
    line-height: 1.05; 
    letter-spacing: -0.5px; 
}

.ligne-titre {
    height: 6px;
    background: linear-gradient(to right, var(--couleur-prim-jaune) 30%, transparent 95%);
    margin-top: 0;
    margin-left: -3px;
    margin-bottom: 35px; 
}

.sous-regle {
    font-family: var(--police-titres);
    color: var(--couleur-prim-bleu);
    font-size: 22px;
    font-weight: 500; 
    font-style: italic;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 5px; 
    line-height: 1.1;
    letter-spacing: -0.2px;
}

.sous-theme {
    font-family: var(--police-titres);
    color: var(--couleur-prim-bleu);
    font-size: 30px;
    font-weight: 700; 
    font-style: italic;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 10px; 
    
    line-height: 1.05; 
}

p { 
    margin-top: 0;
    margin-bottom: var(--espace-md); 
    font-size: 14px; 
    text-align: justify; 
    font-weight: 400; 
    line-height: 1.2;
}

strong { 
    font-weight: 600; 
}

/* --- Liens cliquables --- */
.lien-regle {
    color: var(--couleur-prim-bleu);
    text-decoration: underline;
    font-weight: 500; 
    cursor: pointer;
    transition: color var(--transition-rapide);
}

.lien-regle:hover {
    color: var(--couleur-prim-rouge); 
}

.titre-regle .lien-regle,
.sous-theme .lien-regle {
    font-family: inherit; 
    font-style: inherit;  
    font-weight: 700;     
}

.lettre-souligne {
    color: var(--couleur-prim-bleu);
    font-size: 15px; 
    font-weight: 500; 
    text-decoration: underline;
}


/* ==========================================================================
   4. ENCARTS SPÉCIFIQUES (Remarques & FFHB)
   ========================================================================== */

.remarque-section {
    margin-top: 0;
    margin-bottom: var(--espace-lg); 
    padding: 0;
    background: transparent; 
    color: var(--couleur-texte-principal); 
}

.remarque-section > strong:first-of-type {
    color: var(--couleur-prim-bleu);
    font-family: var(--police-titres);
    font-weight: 500; 
    font-style: italic;
    text-transform: uppercase;
    font-size: 22px;
    display: block;
    margin-top: 0;
    margin-bottom: 5px;
}

.ffhandball-section {
    position: relative; 
    margin-top: 35px; 
    margin-bottom: var(--espace-lg); 
    padding: 15px var(--espace-md) 10px var(--espace-md); 
    background-color: transparent; 
    border: 2px solid var(--couleur-prim-rouge); 
    border-radius: var(--rayon-md); 
    font-size: 14.5px;
}

.ffhandball-section > strong:first-of-type {
    position: absolute;
    top: -13px; 
    left: 20px; 
    background-color: var(--couleur-fond-carte); 
    padding: 0 10px; 
    font-family: var(--police-titres);
    color: var(--couleur-prim-rouge);
    font-weight: 500; 
    font-style: italic;
    text-transform: uppercase;
    font-size: 16px;
    display: inline-block;
    margin: 0;
}


/* ==========================================================================
   5. LISTES ET ÉNUMÉRATIONS
   ========================================================================== */

.page-livret ol, 
.page-livret ul.liste-puces {
    font-size: 15px;
    margin-top: 0px !important; 
    margin-bottom: var(--espace-md) !important;
    line-height: 1.35; 
    font-weight: 400; 
}

p + ol, 
p + ul.liste-puces {
    margin-top: -10px !important; 
}

.page-livret ol { padding-left: var(--espace-xl) !important; }
.page-livret ul.liste-puces { list-style: none; padding-left: var(--espace-lg) !important; }

.page-livret ol li, 
.page-livret ul.liste-puces li {
    margin-top: 0;
    margin-bottom: 4px; 
    position: relative;
}

/* --- Puces personnalisées --- */
.page-livret ul.liste-puces > li::before {
    content: "";
    position: absolute;
    left: -18px !important; 
    top: 5px;
    width: 6px;
    height: 6px;
    background-color: transparent;
    border: 2px solid var(--couleur-prim-bleu);
    border-radius: 50%;
}

/* --- Sous-listes --- */
.page-livret ul.liste-puces li ul {
    list-style: none;
    padding-left: var(--espace-md) !important; 
    margin-top: var(--espace-sm) !important; 
    margin-bottom: 0 !important;
}

.page-livret ul.liste-puces li ul li::before {
    content: "\2022"; 
    position: absolute;
    left: -15px !important; 
    color: var(--couleur-prim-bleu);
    font-size: 18px;
    line-height: 1;
    top: 0;
}

/* --- Listes ordonnées --- */
.page-livret ol[type="a"] { list-style-type: lower-alpha !important; }
.page-livret ol[type="1"] { list-style-type: decimal !important; }
.page-livret ol[type="i"] { list-style-type: lower-roman !important; }

.page-livret ol li::marker {
    font-weight: 600; 
    color: var(--couleur-prim-bleu); 
}

.titre-liste {
    font-family: var(--police-titres);
    font-size: 22px;
    font-weight: 500; 
    font-style: italic;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 0;
}


/* ==========================================================================
   6. IMAGES ET GRILLES (Gestes & Figures)
   ========================================================================== */

.gestes-grid-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.figure-inline {
    background-color: var(--couleur-fond-carte);
    padding: 8px;
    border: 2px solid var(--couleur-bordure);
    border-radius: var(--rayon-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: var(--police-titres);
    color: var(--couleur-prim-bleu);
    font-size: 24px; 
    font-style: italic;
        margin-bottom: var(--espace-lg);
}

.figure-inline > img {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto 5px auto;
    border-radius: 4px;
}

.cartons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.cartons-grid img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--couleur-bordure);
}


/* ==========================================================================
   7. TABLEAUX DE DONNÉES
   ========================================================================== */

.table-responsive {
    width: 100%;
    max-height: 75vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0; 
    margin-bottom: var(--espace-lg); 
    border-radius: var(--rayon-md);
    box-shadow: var(--ombre-legere);
    border: 1px solid var(--couleur-bordure);
}

.page-livret .table-responsive table {
    width: 100% !important;
    border-collapse: collapse !important;
    background-color: var(--couleur-fond-carte) !important;
}

.page-livret .table-responsive table th, 
.page-livret .table-responsive table td {
    padding: 12px var(--espace-md) !important;
    border: 1px solid var(--couleur-bordure) !important;
    vertical-align: middle !important;
    font-size: 14px !important;
}

.page-livret .table-responsive table tbody tr:nth-child(even) td {
    background-color: #fafbfc !important;
}

.page-livret .table-responsive table thead th {
    position: sticky !important;
    top: 0 !important; 
    z-index: 10 !important; 
    background-color: var(--couleur-prim-bleu) !important; 
    color: var(--couleur-texte-inverse) !important;
    font-family: var(--police-titres) !important;
    font-weight: 500 !important;
    font-style: italic !important;
    text-transform: uppercase !important;
    text-align: center !important;
    box-shadow: var(--ombre-legere) !important;
}

/* --- Tableaux spécifiques --- */
.page-livret .table-passif table tbody td:first-child {
    text-align: center !important;
    font-weight: 600 !important;
    color: var(--couleur-prim-bleu) !important;
}

.page-livret .table-passif table tbody td:first-child:not([colspan]) {
    text-align: left !important;
    vertical-align: top !important;
    font-weight: 400 !important;
    color: var(--couleur-texte-principal) !important;
}

.page-livret .table-passif table td ol,
.page-livret .table-passif table td ul.liste-puces {
    margin-bottom: -15px !important;
}

.page-livret .table-passif table tbody tr td[colspan] {
    background-color: var(--couleur-prim-bleu) !important;
    color: var(--couleur-texte-inverse) !important;
    font-family: var(--police-titres) !important;
    font-weight: 400 !important;
    font-style: italic !important;
    text-transform: uppercase !important;
    text-align: left !important;
    padding: 8px !important;
}

.croix-passif {
    font-size: 24px !important;
    font-style: italic !important;
    font-weight: 700 !important;
    color: var(--couleur-prim-bleu) !important;
    text-align: center !important;
    vertical-align: middle !important;
}


/* ==========================================================================
   8. SOMMAIRE
   ========================================================================== */

.sommaire-container {
    display: block; 
    margin-top: var(--espace-md); 
}

.sommaire-colonne {
    display: block;
}

.sommaire-titre-section {
    font-family: var(--police-titres);
    color: var(--couleur-prim-bleu);
    font-size: 24px; 
    font-weight: 700; 
    font-style: italic;
    text-transform: uppercase;
    margin-top: 20px; 
    margin-bottom: 8px; 
    padding-bottom: 2px;
    border-bottom: 2px solid var(--couleur-prim-bleu); 
}

.sommaire-colonne .sommaire-titre-section:first-child {
    margin-top: 0;
}

.sommaire-item {
    margin-bottom: 4px; 
    font-size: 15px;
    font-family: var(--police-texte); 
}

.sommaire-item a {
    display: block;
    width: 100%;
    color: var(--couleur-prim-bleu);
    text-decoration: none; 
    font-weight: 500; 
    border-bottom: 2px dotted #ccc; 
    transition: color var(--transition-rapide);
}


.sommaire-item a:hover {
    color: var(--couleur-prim-rouge); 
}


/* ==========================================================================
   9. COMPOSANTS INTERACTIFS (Boutons, Popups, Recherche)
   ========================================================================== */

#btn-retour-haut {
    position: fixed;
    bottom: var(--espace-xl);
    right: var(--espace-xl);
    z-index: 9999; 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    padding: 0; 
    text-align: center;
    line-height: 50px; 
    font-size: 24px;
    border: none;
    background-color: var(--couleur-prim-bleu); 
    color: var(--couleur-texte-inverse);
    cursor: pointer;
    box-shadow: var(--ombre-moyenne);
    transition: background-color var(--transition-rapide), transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    #btn-retour-haut:hover { background-color: var(--couleur-prim-rouge); }
}
#btn-retour-haut:active { transform: scale(0.90) !important; }

#btn-recherche {
    position: fixed;
    bottom: var(--espace-xl);
    right: 90px; 
    z-index: 9999;
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    font-size: 20px;
    border: none;
    background-color: var(--couleur-prim-bleu); 
    color: var(--couleur-texte-inverse);
    cursor: pointer;
    box-shadow: var(--ombre-moyenne);
    transition: background-color var(--transition-rapide), transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; 
}

#btn-recherche svg {
    transform: translate(-1px, -1px);
}

#btn-recherche:hover { background-color: var(--couleur-prim-rouge); }
#btn-recherche:active { transform: scale(0.90); }

#search-bar-container {
    display: none; 
    position: fixed;
    bottom: var(--espace-xl);
    left: 50%;
    transform: translateX(-50%);
    background: var(--couleur-fond-carte);
    padding: 10px 20px;
    border-radius: var(--rayon-lg);
    box-shadow: var(--ombre-forte);
    z-index: 10000; 
    align-items: center;
    gap: var(--espace-sm);
    border: 2px solid var(--couleur-prim-bleu);
}

#search-bar-container input {
    border: none;
    outline: none;
    font-size: 16px;
    width: 200px;
    font-family: var(--police-texte);
    font-weight: 400;
}

#search-count {
    font-size: 14px;
    color: var(--couleur-texte-secondaire);
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

.search-nav-buttons {
    display: flex;
    gap: 5px;
    border-left: 1px solid var(--couleur-bordure);
    border-right: 1px solid var(--couleur-bordure);
    padding: 0 10px;
}

#search-bar-container button {
    background: var(--couleur-fond-survol);
    color: var(--couleur-prim-bleu);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    min-width: 30px;
    flex-shrink: 0;
    cursor: pointer;
    font-weight: 700;
    transition: background var(--transition-rapide);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#search-bar-container button:hover { background: #d3dce6; }
#search-close { background: var(--couleur-prim-rouge) !important; color: white !important; }
#search-close:hover { background: #c0392b !important; }

mark.search-highlight {
    background-color: var(--couleur-prim-jaune); 
    color: var(--couleur-prim-bleu);
    border-radius: 2px;
    padding: 0 2px;
}
mark.search-highlight.active {
    background-color: var(--couleur-prim-rouge); 
    color: var(--couleur-texte-inverse);
}

/* --- Popups de règles --- */
.popup-regle {
    position: absolute;
    background-color: var(--couleur-fond-carte);
    border: 2px solid var(--couleur-prim-bleu);
    box-shadow: var(--ombre-forte);
    border-radius: var(--rayon-md);
    max-width: 500px;
    overflow: hidden;
    z-index: 1000;
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out;
}

.popup-header {
    background-color: var(--couleur-prim-bleu);
    color: var(--couleur-texte-inverse);
    padding: 12px var(--espace-md);
    cursor: move; 
    font-family: var(--police-titres);
    font-weight: 500;
    font-style: italic;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header-actions {
    display: flex;
    align-items: center;
    gap: var(--espace-md); 
}

.resize-btn, .close-btn {
    cursor: pointer;
    color: var(--couleur-texte-inverse);
    font-size: 16px;
    font-weight: normal;
    transition: transform var(--transition-rapide);
    user-select: none; 
}
.resize-btn:hover, .close-btn:hover { transform: scale(1.2); }

.popup-content {
    padding: var(--espace-lg); 
    font-size: 14.5px; 
    max-height: 450px; 
    overflow-y: auto;
    color: var(--couleur-texte-principal); 
}

.popup-content img {
    width: 100% !important; 
    height: auto !important; 
    max-height: none !important;
    object-fit: contain !important; 
    display: block !important;
    margin: var(--espace-sm) auto var(--espace-md) auto !important;
    border-radius: var(--rayon-sm); 
    box-shadow: var(--ombre-legere); 
}

.popup-regle.is-maximized {
    position: fixed !important; 
    top: 5vh !important;
    left: 5vw !important;
    width: 90vw !important;
    height: 90vh !important;
    max-width: none !important;
}

.popup-regle.is-maximized .popup-content {
    max-height: calc(90vh - 50px) !important; 
}


/* ==========================================================================
   10. RESPONSIVE DESIGN (Mobiles & Tablettes)
   ========================================================================== */

@media (max-width: 768px) {
    /* --- Structure globale --- */
    body { padding: 10px; }
    .page-livret { padding: 25px 15px; }

    /* --- Typographie --- */
    .titre-regle, .titre-principal { font-size: 30px; margin-bottom: 0px; } 
    .sous-theme { font-size: 22px; } 
    .sous-regle { font-size: 20px; } 
    p, .lettre-souligne, .remarque-section { font-size: 14px; }
    .ligne-titre {margin-top: -5px;}

    /* --- Encarts FFHB --- */
    .ffhandball-section {
        padding: 15px 10px 10px 10px; 
        margin-top: 30px;
    }
    .ffhandball-section > strong:first-of-type {
        font-size: 13.5px; 
        left: 10px; 
        top: -11px;
    }

    /* --- Listes --- */
    .page-livret ol { padding-left: 20px !important; }
    .page-livret ul.liste-puces { padding-left: 25px !important; }
    .page-livret ol, 
    .page-livret ul.liste-puces { font-size: 14px; }
    .page-livret ul.liste-puces > li::before { left: -15px !important; }

    /* --- Tableaux --- */
    .page-livret .table-responsive table th,
    .page-livret .table-responsive table td {
        padding: 8px 6px !important; 
        font-size: 13px !important; 
    }
    .page-livret .table-contre table thead th:first-child,
    .page-livret .table-contre table tbody td:first-child {
        min-width: 40px !important;
        max-width: 100px !important;
        white-space: normal !important;
    }

    .page-livret .table-passif table th:nth-child(1) { width: 50% !important; }
    .page-livret .table-passif table th:nth-child(2) { width: 25% !important; }
    .page-livret .table-passif table th:nth-child(3) { width: 25% !important; }
    

    /* --- Sommaire --- */
    .sommaire-titre-section { font-size: 20px; margin-top: 20px; }
    .sommaire-item, .sommaire-item a { font-size: 14px; }

    /* --- Composants Interactifs --- */
    .popup-regle {
        position: fixed !important;
        width: 95vw !important; 
        max-width: none !important;
        left: 2.5vw !important; 
        top: 5vh !important;
    }
    .popup-content {
        padding: 15px; 
        max-height: 75vh !important; 
    }

    #btn-retour-haut {
        bottom: 20px;
        right: 20px;
        width: 44px; 
        height: 44px;
    }
    
    #btn-recherche {
        bottom: 20px;
        right: 75px; 
        width: 44px; 
        height: 44px;
    }

    #search-bar-container {
        bottom: auto; 
        top: 10px; 
        width: 95vw;
        padding: 8px 10px;
        box-sizing: border-box;
    }
    #search-bar-container input { width: 100%; }
}

@media (max-width: 768px) {
    /* --- Grilles Images --- */
    .gestes-grid-2cols, .cartons-grid {
        grid-template-columns: 1fr; 
        gap: 15px;
    }
}

/* ==========================================================================
   11. PAGE "À PROPOS" ET TUTORIEL
   ========================================================================== */

.a-propos-section {
    margin-bottom: var(--espace-md);
}

/* --- Lien Calaméo --- */
.lien-externe {
    display: inline-block;
    color: var(--couleur-prim-rouge);
    font-weight: 500;
    text-decoration: underline;
    font-size: 14px;
    margin-bottom: var(--espace-md);
    transition: color var(--transition-rapide);
}

.lien-externe:hover {
    color: var(--couleur-prim-cyan);
}

/* --- Les Mentions Légales allégées --- */
.mentions-legales {
    font-size: 13px;
    color: var(--couleur-texte-inverse);
    line-height: 1.5;
    margin-bottom: var(--espace-sm);
    padding: 0; 
    background-color: transparent; 
}


/* --- Bouton d'installation --- */
.installation-wrapper {
    padding-top: var(--espace-md);
    padding-bottom: var(--espace-md);
    display: flex;
    justify-content: center;
}

.btn-installer {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--couleur-prim-rouge);
    color: var(--couleur-texte-inverse) !important;
    border: none;
    padding: 10px 20px;
    border-radius: var(--rayon-lg);
    cursor: pointer;
    box-shadow: var(--ombre-moyenne);
    transition: background-color var(--transition-rapide), transform 0.1s ease;
    text-decoration: none !important;
}

.btn-installer:hover {
    background-color: var(--couleur-prim-cyan);
}

.btn-installer:active {
    transform: scale(0.95);
}

.btn-label {
    font-family: var(--police-texte);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Tuto Popup --- */
.tuto-intro { 
    text-align: center; 
    font-family: var(--police-titres);
    font-style: italic;
    font-size: 18px; 
    color: var(--couleur-prim-bleu); 
    margin-bottom: var(--espace-md); 
}

.tuto-box { 
    margin-top: var(--espace-md); 
    padding: 15px; 
    background-color: var(--couleur-fond-survol); 
    border-radius: var(--rayon-sm); 
    font-family: var(--police-texte);
}

.tuto-box.box-apple { border-left: 4px solid var(--couleur-prim-bleu); }
.tuto-box.box-android { border-left: 4px solid var(--couleur-prim-rouge); }

.tuto-box strong.tuto-titre { 
    color: var(--couleur-prim-bleu); 
    font-family: var(--police-titres);
    font-weight: 500;
    font-style: italic;
    font-size: 16px;
    text-transform: uppercase;
    display: flex; 
    align-items: center;
    margin-bottom: 12px; 
}

.tuto-box ol { margin-top: 0 !important; margin-bottom: 0 !important; padding-left: 20px !important; }
.tuto-box ol li { font-size: 14.5px; margin-bottom: 8px; line-height: 1.4; }




/* =========================================
   PAGE DE GARDE 
   ========================================= */

#a-propos {
    background-color: var(--couleur-prim-bleu);
    color: var(--couleur-texte-inverse);
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 50px;
    position: relative; 
    overflow: hidden;
    z-index: 1;
}

/* Logo en haut à droite */
.logo-top-right {
    position: absolute;
    top: 0px !important;
    right: 30px !important;
    max-width: 200px !important;
    height: auto;
    
}

/* Titres */
.titre-garde {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 80px;
}

.titre-garde h1 {
    font-family: var(--police-titres); 
    color: var(--couleur-texte-inverse);
    font-size: 60px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.5px;
}

.titre-garde h2 {
    font-family: var(--police-titres);
    color: var(--couleur-prim-cyan);
    font-size: 40px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    margin-top: 10px;
}

.titre-garde h3 {
    font-family: var(--police-titres); 
    color: var(--couleur-texte-inverse);
    font-size: 30px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.titre-garde h4 {
    font-family: var(--police-titres);
    color: var(--couleur-prim-cyan);
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    
}

.titre-garde h4 a{
    font-family: var(--police-titres);
    color: var(--couleur-prim-cyan);
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    
}

.titre-garde h4 a:hover{
    color: var(--couleur-prim-rouge); 
}

.createur {
    position: absolute;
    bottom: 20px;
    right: 30px;
    color: var(--couleur-prim-jaune);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive de la page de garde pour mobiles */
@media (max-width: 768px) {
    .titre-garde h1 { font-size: 40px; }
    .titre-garde h2 { font-size: 25px; }
    .titre-garde h3 { font-size: 18px; }
    .titre-garde h4 { font-size: 15px; }
    .titre-garde h4 a{ font-size: 15px; }
    .logo-top-right { max-width: 60px; top: 15px; right: 15px; }
    .createur { right: 15px; bottom: 15px; }
    .logo-top-right {max-width: 120px !important;}
    #a-propos::before {
        background-position: left center !important; 
       
    }
}

#a-propos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/fond.jpg'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    z-index: -1;
    
    opacity: 0.7; 
}


/* --------------------------------------------------------------------------
   1. TABLE RPA — ÉQUIPEMENTS DE PROTECTION
   Classe .table-rpa à ajouter sur chaque div.table-responsive.table-passif
   de la section #RPA
   -------------------------------------------------------------------------- */
 
/* table-layout:fixed rend les largeurs colgroup opérationnelles */
.table-rpa table {
    table-layout: fixed;
    min-width: 600px; /* scroll horizontal sur très petit écran */
}
 
/* Colonne 1 : Éléments — 15 % */
/* Colonne 2 : Exemples  — 30 % (géré via colgroup dans le HTML)   */
/* Colonne 3 : Décision  — 15 %                                     */
/* Colonne 4 : Commentaires — 40 %                                  */
 
/* --- Centrage horizontal + vertical de toutes les cellules --- */
/* Override de .table-passif td:first-child:not([colspan]) qui force left/top */
.page-livret .table-rpa table tbody td:first-child:not([colspan]) {
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 600 !important;
    color: var(--couleur-prim-bleu) !important;
}
/* Colonnes 2 et 3 : centrage horizontal (vertical déjà middle via table-responsive) */
.page-livret .table-rpa table td:nth-child(2),
.page-livret .table-rpa table td:nth-child(3) {
    text-align: center !important;
    vertical-align: middle !important;
}
/* Colonne 4 : texte justifié à gauche, centré verticalement */
.page-livret .table-rpa table td:nth-child(4) {
    text-align: left !important;
    vertical-align: middle !important;
}
 
/* --- Colonne Exemples : image quasi pleine cellule --- */
/* Padding réduit pour maximiser la place de l'image */
.page-livret .table-rpa table td:nth-child(2) {
    padding: 4px !important;
}
/* Override du margin:24px auto de .page-livret img */
.page-livret .table-rpa table td:nth-child(2) img {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 0;
}
 
/* --- Colonne Décision : ok.png / non.png centrés, taille fixe --- */
.page-livret .table-rpa table td:nth-child(3) img {
    height: 38px;
    width: auto;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 0;
}
 
/* --------------------------------------------------------------------------
   2. MOTS COLORÉS dans la colonne Restrictions / Commentaires
   - .mot-autorise → vert
   - .mot-interdit → rouge (couleur primaire de la charte)
   -------------------------------------------------------------------------- */
.mot-autorise { color: #2a8c3c; font-weight: 600; }
.mot-interdit { color: var(--couleur-prim-rouge); font-weight: 600; }


/* --------------------------------------------------------------------------
   4. BARRES DE DÉFILEMENT FINES ET AUX COULEURS DE LA CHARTE
   Cosmétique : des scrollbars discrètes plutôt que les grosses barres
   grises par défaut. (Firefox + navigateurs WebKit/Chromium.)
   -------------------------------------------------------------------------- */
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: var(--couleur-prim-bleu) transparent;
}
.table-responsive::-webkit-scrollbar { width: 10px; height: 10px; }
.table-responsive::-webkit-scrollbar-track { background: transparent; }
.table-responsive::-webkit-scrollbar-thumb {
    background: var(--couleur-prim-bleu);
    border-radius: 10px;
    border: 2px solid var(--couleur-fond-carte);
}
.table-responsive::-webkit-scrollbar-thumb:hover { background: var(--couleur-prim-rouge); }

/* --------------------------------------------------------------------------
   5. NOTE DE BAS DE PAGE (références légales sous « Dispositions Juges-arbitres »)
   Remplace le style inline du brouillon par une classe réutilisable.
   -------------------------------------------------------------------------- */
.page-livret .note-bas-page {
    font-size: 0.85em;
    font-style: italic;
    color: var(--couleur-texte-secondaire);
}

/* --- Séparateur de paragraphes --- */
.separateur-paragraphe {
    color: var(--couleur-prim-cyan);
    font-size: 12px;
    user-select: none;
}