/* ==========================================================================
   1. STYLE GÉNÉRAL
   ========================================================================== */

html, body {
    overflow-x: hidden; /* Empêche l'ascenseur horizontal */
}

body {
    font: 15px arial;
    line-height: 20px;
    background: #edf url(Images/fond.gif);
    margin: 3px 10px 0 10px; /* Marge en haut pour éviter l'effet "plaqué" */
    padding: 0;
}

* { outline: 0; }

img { 
    box-shadow: 2px 2px 2px #aaa; 
    max-width: 100%; 
    height: auto; 
    vertical-align: middle;
}

img:hover { 
    box-shadow: -1px -1px #aaa; 
}

/* ==========================================================================
   2. STRUCTURE DU TABLEAU D'EN-TÊTE (PC)
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; 
    margin: 1px 0 0 0 !important; /* Réglage précis du cadrage haut */
}

/* Colonne 1 : Icônes et compteurs */
td:first-child {
    width: 345px;
    min-width: 345px;
    max-width: 345px;
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
    height: 28px;
    padding: 0;
}

/* Colonne 2 : Fenêtre de texte défilant */
td:last-child {
    text-align: right;
    vertical-align: middle;
    height: 28px;
    padding: 0;
}

/* Compteur de visites */
.visites-count {
    text-shadow: 1px 1px 2px #777;
    display: inline-block;
    font-size: 15px;
    position: relative;
    top: 6px; 
}

/* ==========================================================================
   3. FENÊTRE DE TEXTE DÉFILANT (SYSTÈME FLUIDE)
   ========================================================================== */

.cadre-defileur {
    display: inline-block;
    background-color: #ffffff !important;
    border: 1px solid #aaa;
    border-radius: 1px;
    height: 21px;
    line-height: 21px;
    overflow: hidden;
    position: relative;
    /* --- RÉGLAGE DE LA LARGEUR ICI --- */
    width: 500px; 
    /* ---------------------------------- */
    margin: 0;
    box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.2);
    pointer-events: none; 
}

.texte-anim {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: scroll-fluide 25s linear infinite;
    font-size: 13px;
    color: #000;
    height: 22px;
}

@keyframes scroll-fluide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ==========================================================================
   4. VIDÉO & POINTEUR
   ========================================================================== */

video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    box-shadow: 2px 2px 2px #777;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
}

#Pointeur {
    display: none;
    position: absolute;
    top: 32px;   
    left: 105px; 
    z-index: 500;
}

#Pointeur img { 
    width: 20px;
    box-shadow: none !important; 
}

#Pointeur b {
    color: black;
    vertical-align: middle;
}

/* ==========================================================================
   5. TOOLTIPS (PC)
   ========================================================================== */

.tooltip { font-style: normal; position: relative; display: inline-block; }

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    background-color: #333; 
    color: white;           
    padding: 5px 10px;
    border-radius: 6px;    
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 1000;
    transition: opacity 0.2s;
    pointer-events: none;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.tooltip::after {
    content: "";
    position: absolute;
    opacity: 0;
    visibility: hidden;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
    transition: opacity 0.2s;
}

.tooltip:hover::before, .tooltip:hover::after { 
    visibility: visible; 
    opacity: 1; 
}

/* ==========================================================================
   6. CONFIGURATION MOBILE (Écrans < 600px)
   ========================================================================== */

@media (max-width: 600px) {
    body {
        margin: 5px;
        width: calc(100% - 10px);
    }

    table, tbody, tr, td {
        display: block !important;
        width: 100% !important;
    }

    td:first-child {
        text-align: center !important;
        padding: 10px 0 !important;
        height: auto;
    }

    td:last-child {
        text-align: center !important;
        height: auto;
    }

    .cadre-defileur {
        width: 90% !important;
        margin: 0 auto 15px auto !important;
        display: block;
    }

    .tooltip::before, .tooltip::after { 
        display: none !important; 
    }

    #Pointeur {
        display: none !important;
    }
}