html, body {
    overflow-x: hidden;
}

#et-vote-app {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: inherit;
    
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 30px !important; 
    overflow: hidden;
    box-sizing: border-box;
}

.et-hero-banner {
    position: relative;
    padding: 120px 40px 40px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    min-height: 350px; 
    overflow: hidden;
}

.et-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(3px);
    transform: scale(1.05); 
    z-index: 1;
}

.et-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom, 
        rgba(24,24,24,0.1) 0%, 
        rgba(24,24,24,0.3) 40%, 
        rgba(24,24,24,0.5) 50%, 
        rgba(24,24,24,0.7) 60%,   
        rgba(24,24,24,0.9) 70%, 
        #181818 80%
    );
    z-index: 2;
}

.et-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
    transform: translateY(-70px); 
}

.et-title-main {
    color: #ffffff;
    text-transform: uppercase;
    font-size: 75px; 
    font-weight: 900;
    margin: 0 0 15px 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.9);
    letter-spacing: 3px;
    line-height: 1;
}

.et-subtitle-bottom {
    color: #ffffff;
    font-size: 26px;
    font-weight: 500;
    margin: 15px;
    letter-spacing: 2px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    line-height: 1.4;
}

/* ZONE DE VOTE ET LAYOUT */
.et-zone-vote {
    position: relative;
    z-index: 3;
    padding: 0 40px 30px 40px; 
    width: 100%; 
    margin: -50px 0 0 0; 
    box-sizing: border-box;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* La zone de vote prend TOUT l'espace restant disponible */
.et-main-vote-wrapper {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

/* L'encart fixe sa hauteur, sa largeur s'adapte à l'image */
.et-encart-side {
    flex: 0 0 auto;
    height: 560px; /* <-- MODIFIE CETTE VALEUR POUR CHANGER LA HAUTEUR */
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.et-encart-side a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.et-encart-side img {
    height: 100%;
    width: auto; /* Calcule la largeur automatiquement selon le ratio de l'image */
    display: block;
    border-radius: 16px;
    object-fit: contain;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Petit effet d'interaction au survol du lien */
.et-encart-side a:hover img {
    transform: scale(1.02);
    opacity: 0.95;
}

.et-layout { display: flex; gap: 25px; flex-wrap: wrap; }

/* Conteneur avec perspective adoucie (réduit la largeur en bas) */
.et-col-terrain { 
    flex: 1; 
    min-width: 300px; 
    perspective: 1500px; /* Caméra plus éloignée = moins de déformation */
    display: flex; 
    flex-direction: column;
}

.et-terrain-titre { 
    font-size: 20px; 
    font-weight: bold; 
    margin: auto; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: #fff;
}

/* 1. Conteneur principal (La zone libre) */
.et-terrain-visuel {
    background-color: var(--c-terrain-bg);
    border-radius: 4px;
    position: relative;
    aspect-ratio: 4/5;
    width: 100%;
    max-width: 420px;
    margin: auto;
    
    /* Inclinaison 3D maintenue */
    transform: rotateX(20deg);
    transform-style: preserve-3d;
    
    /* Épaisseur de la plateforme 3D calculée automatiquement par CSS ! */
    box-shadow: 
        0 1px 0 color-mix(in srgb, var(--c-terrain-bg) 85%, black),
        0 2px 0 color-mix(in srgb, var(--c-terrain-bg) 75%, black),
        0 3px 0 color-mix(in srgb, var(--c-terrain-bg) 65%, black),
        0 4px 0 color-mix(in srgb, var(--c-terrain-bg) 55%, black),
        0 5px 0 color-mix(in srgb, var(--c-terrain-bg) 45%, black),
        0 6px 0 color-mix(in srgb, var(--c-terrain-bg) 35%, black),
        0 20px 30px rgba(0,0,0,0.7);
}

/* 2. La ligne en pointillés réalignée et décalée */
.et-terrain-visuel::before {
    content: '';
    position: absolute;
    /* Ajusté à 31.7% pour tomber pile sur la séparation du dégradé (la ligne d'attaque) */
    top: 35.5%; 
    /* Décalé vers la gauche : dépasse de 4% de chaque côté du terrain */
    left: 0%;
    right: 1%;
    border-top: 3px dashed var(--c-lignes);
    z-index: 1;
}

/* 3. Le terrain de volley intérieur décalé */
.et-terrain-visuel::after {
    content: '';
    position: absolute;
    /* Marges modifiées :
       - Gauche réduite (6%)
       - Droite fortement augmentée (18%) pour placer le Libéro
       - Bas réduit (12%) pour supprimer l'excédent de l'arrière */
    top: 2%; 
    left: 2%; 
    right: 18%; 
    bottom: 2%; 
    z-index: 2;
    
    border: 3px solid var(--c-lignes);
    background: linear-gradient(180deg, 
        var(--c-terrain-interieur) 0%, 
        var(--c-terrain-interieur) calc(35% - 1.5px), 
        var(--c-lignes) calc(35% - 1.5px), 
        var(--c-lignes) calc(35% + 1.5px), 
        var(--c-terrain-interieur) calc(35% + 1.5px), 
        var(--c-terrain-interieur) 100%
    );
}


.et-slot { 
    position: absolute; 
    /* On augmente le translateZ de 25px à 40px pour soulever les joueurs hors du sol */
    transform: translate(-50%, -50%) translateZ(40px) rotateX(-20deg); 
    width: 100px; 
    text-align: center; 
    z-index: 10; 
    
    /* Propriétés anti-glitch 3D pour forcer un affichage propre sur tous les navigateurs */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    outline: 1px solid transparent; 
}

/* --- ÉTAT VIDE --- */
.et-slot-empty { display: flex; flex-direction: column; align-items: center; }
.et-slot.filled .et-slot-empty { display: none; }

.et-slot-icon { width: 40px; height: 40px; background: rgba(0,0,0,0.4); border-radius: 50%; border: 2px dashed rgba(255,255,255,0.5); margin-bottom: 5px; display: flex; align-items: center; justify-content: center; }
.et-slot-icon svg { width: 20px; height: 20px; fill: #fff; opacity: 0.5; }
.et-slot-label { font-size: 10px; font-weight: bold; color: rgba(255,255,255,0.7); text-transform: uppercase; }

/* --- ÉTAT REMPLI --- */
.et-slot-filled-content { display: none; flex-direction: column; align-items: center; width: 100%; }
.et-slot.filled .et-slot-filled-content { display: flex; }

.et-slot-visuel { position: relative; width: 60px; height: 60px; margin-bottom: 4px; }
.et-slot-logo { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)); }

/* La pastille grise avec la lettre du poste */
.et-slot-badge { 
    position: absolute; 
    top: -4px; 
    right: -10px; 
    width: 26px; 
    height: 26px; 
    background: #4a4a4a; 
    color: #b5b5b5; 
    font-size: 12px; 
    font-weight: 900; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    cursor: help; 
}

/* LA BULLE NOIRE (TOOLTIP) */
.et-slot-badge::after {
    content: attr(data-tooltip); 
    position: absolute;
    bottom: 130%; 
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none; 
    z-index: 100;
}

/* LA PETITE FLÈCHE SOUS LA BULLE */
.et-slot-badge::before {
    content: '';
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(15px); 
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

/* ANIMATION AU SURVOL DE LA SOURIS */
.et-slot-badge:hover::after,
.et-slot-badge:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Le texte coloré dynamiquement */
.et-slot-nom { 
    font-size: 14px; 
    font-weight: 900; 
    color: var(--c-nom); 
    line-height: 1.1; 
    text-transform: capitalize;

    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.et-slot-prenom { 
    font-size: 12px; 
    font-weight: 800; 
    color: var(--c-prenom); 
    line-height: 1; 
    text-transform: capitalize;
    
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 4. Positions des joueurs */

/* Première ligne */
.slot-r4-1 { top: 22%; left: 68%; } 
.slot-central-1 { top: 22%; left: 42%; } 
.slot-pointu { top: 22%; left: 16%; }

/* Deuxième ligne */
.slot-r4-2 { top: 63%; left: 16%; } 
.slot-central-2 { top: 63%; left: 42%; } 
.slot-passeur { top: 63%; left: 68%; }

/* Libéro (Zone libre à droite) */
.slot-libero { top: 87%; left: 88%; }

/* ÉTAPES ET CARTES JOUEURS */
.et-col-etapes { flex: 1.5; min-width: 300px; display: flex; flex-direction: column; }
.et-etape-container { display: none; animation: fadeIn 0.3s ease-in-out; }
.et-etape-container.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.et-etape-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid #333; padding-bottom: 15px; }
.et-etape-header h3 { font-size: 20px; color: #fff; margin: 0; text-transform: uppercase; letter-spacing: 1px; }
.et-etape-compteur { font-size: 14px; color: #aaa; font-weight: bold; background: #262626; padding: 4px 10px; border-radius: 20px; }

/* Grille fixée sur 4 colonnes */
.et-grille-joueurs { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
}

/* Design des cartes Joueur */
.et-carte { 
    background: #4a4a4a; 
    border: 3px solid transparent; 
    border-radius: 16px;
    padding: 20px 10px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.2s; 
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.et-carte:hover { 
    transform: translateY(-4px); 
    background: #555555;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.et-carte input { display: none; }

/* Carte sélectionnée */
.et-carte.selected { 
    border-color: var(--c-accent); 
    background: rgba(255, 255, 255, 0.05); 
}

/* Logo du club */
.et-carte-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 12px;
}

.et-carte-nom { 
    display: block; 
    font-weight: 800; 
    font-size: 16px; 
    margin-bottom: 4px; 
    color: #ffffff; 
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
}

.et-carte-prenom { 
    display: block; 
    font-weight: 500; 
    font-size: 14px; 
    margin-bottom: 4px; 
    color: #ffffff; 
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
}

.et-carte-club { 
    display: block; 
    font-size: 14px; 
    color: #a0a0a0; 
    font-weight: 500;
}

.et-carte-badge { 
    position: absolute; 
    top: -10px; 
    right: -10px; 
    background: var(--c-accent); 
    color: #fff; 
    font-size: 12px; 
    font-weight: bold; 
    padding: 6px 10px; 
    border-radius: 20px; 
    display: none; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.4); 
}
.et-carte.selected .et-carte-badge { display: block; }

/* CONTENEUR NAVIGATION */
.et-navigation { 
    margin-top: auto; 
    padding-top: 30px; 
    display: flex; 
    justify-content: space-between; 
    gap: 15px; 
}

/* 1. ÉTAT ACTIF / NORMAL */
.et-btn, .et-btn-prev, .et-btn-next, .et-btn-submit { 
    background: #242424 !important; 
    color: #dddddd !important; 
    border: 2px solid #555555 !important; 
    padding: 12px 25px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 15px; 
    font-weight: 600; 
    transition: all 0.2s ease; 
    flex: 1; 
    text-align: center; 
    text-transform: none !important; 
    letter-spacing: 0.5px; 
    box-shadow: none !important;
}

/* 2. ÉTAT DÉSACTIVÉ */
.et-btn:disabled, .et-btn-next:disabled, .et-btn-prev:disabled { 
    background: #1a1a1a !important;
    color: #4a4a4a !important;
    border: 2px solid #1a1a1a !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* 3. ÉTAT AU SURVOL */
.et-btn:hover:not(:disabled), .et-btn-next:hover:not(:disabled), .et-btn-prev:hover:not(:disabled) { 
    background: #75acc7 !important; 
    color: #ffffff !important; 
    border-color: #75acc7 !important; 
    transform: translateY(-2px); 
    box-shadow: 0 0 10px 1px color-mix(in srgb, #75acc7 40%, transparent) !important; 
}

/* Bouton Valider spécifique */
.et-btn-submit { display: none; }
.et-btn-submit:hover:not(:disabled) { 
    background: var(--c-accent) !important; 
    border-color: var(--c-accent) !important; 
    transform: translateY(-2px); 
    box-shadow: 0 0 10px 1px color-mix(in srgb, var(--c-accent) 40%, transparent) !important; 
}

.footer-signature {
    display: flex !important; 
    flex-wrap: wrap !important;
    align-items: center !important; 
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important; 
    margin: 20px auto 0 120px !important; 
    padding-top: 15px !important;
    color: #a0a0a0; 
    font-size: 0.9em; 
    width: 100% !important; 
    grid-column: 1 / -1 !important;
}
.footer-signature span {
    white-space: nowrap !important;
}
.footer-separator { color: #a0a0a0; }
.footer-socials { display: flex; gap: 8px; align-items: center; }
.social-icon { color: #888; transition: all 0.2s ease; display: flex; align-items: center; }
.social-icon.github:hover { color: #fff; transform: scale(1.1); }
.social-icon.linkedin:hover { color: #0077b5; transform: scale(1.1); }

/* DESIGN DU MESSAGE DE SUCCÈS */
.et-message-succes {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #181818;
    border-radius: 10px;
    padding: 80px 40px;
    height: 100%; 
    min-height: 560px;
    animation: fadeIn 0.5s ease-in-out;
}

.et-message-succes h2 {
    color: var(--c-accent); 
    font-size: 38px;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-style: italic; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.et-message-succes p {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
}

/* POPUP DE CONNEXION */
.et-popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none; justify-content: center; align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}
.et-popup-content {
    background: #181818; padding: 40px; border-radius: 16px;
    text-align: center; max-width: 400px; width: 90%;
    border: 2px solid var(--c-accent); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease-out;
}
.et-popup-content h3 { color: var(--c-accent); margin-top: 0; font-size: 24px; font-weight: bold; text-transform: uppercase; }
.et-popup-content p { color: #aaa; margin-bottom: 0px; line-height: 1.5; }

.et-encart-bottom {
    display: none; 
}

/* BOUTON PARTAGER (Message de succès) */
.et-btn-partager {
    margin-top: 30px;
    background-color: var(--c-accent); /* S'adapte à Alterna ou Saforelle */
    color: #ffffff;
    border: none;
    padding: 15px 40px !important;
    font-size: 18px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 350px; /* Évite qu'il soit trop large sur grand écran */
}

.et-btn-partager:hover {
    transform: translateY(-3px);
    background-color: color-mix(in srgb, var(--c-accent) 80%, white);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* TEXTE DE SUCCÈS MOBILE (Caché sur ordinateur) */
.et-succes-mobile-text {
    display: none;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-in-out;
}
.et-succes-mobile-text h2 {
    color: var(--c-accent); 
    font-size: 38px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-style: italic; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.et-succes-mobile-text p {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
}

/* GABARIT D'EXPORT PNG (MASQUÉ DU FLUX NORMAL) */
.et-export-hidden {
    position: absolute; /* Remplacer fixed par absolute */
    left: -9999px;
    top: 0; /* Remplacer -9999px par 0 pour éviter des bugs de rendu */
    width: 1080px; /* Taille exacte du format carré Instagram/Twitter */
    height: 1080px;
    box-sizing: border-box;
    padding: 50px 50px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: inherit;
    color: #ffffff;
    border-radius: 40px;  /* à ajuster */
    overflow: hidden;
}

.et-export-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.et-export-logo-left {
    justify-self: start;
}

.et-export-title-zone {
    text-align: center;
}

.et-export-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
}

.et-export-subtitle {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.et-export-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.et-export-terrain-target {
    width: 100%;
    max-width: 670px;
    margin: auto;
}

/* --- LE NOUVEAU TERRAIN PLAT POUR L'EXPORT --- */
.et-export-terrain-flat {
    position: relative;
    width: 100%;
    max-width: 670px; 
    aspect-ratio: 4/5;
    margin: auto;
    box-sizing: border-box;
    border-radius: 4px;
}

/* On reproduit exactement les marges de ton terrain original */
.et-export-terrain-interieur {
    position: absolute;
    top: 2%; left: 2%; right: 18%; bottom: 2%; 
    box-sizing: border-box;
}

/* La ligne centrale du volley */
.et-export-ligne-mediane {
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    height: 4px;
    transform: translateY(-50%);
}

/* La ligne des 3 mètres (pointillée) */
.et-export-ligne-attaque {
    position: absolute;
    top: 35.5%; 
    left: 0%;
    right: 1%;
    z-index: 1;
}

/* --- REPOSITIONNEMENT DES JOUEURS POUR LE TERRAIN PLAT (EXPORT) --- */
/* On donne un peu plus de largeur aux joueurs pour éviter que les noms ne se coupent */
#et-export-card .et-slot {
    width: 150px !important; 
    transform: translate(-50%, -50%) scale(1) !important;
    box-shadow: none !important;
}

#et-export-card .et-slot-visuel {
    width: 100px !important;
    height: 100px !important;
    margin: 0 auto 6px auto !important;
}

#et-export-card .et-slot-badge {
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    top: -4px !important;
    right: -10px !important;
}

#et-export-card .et-slot-nom { font-size: 20px !important;}
#et-export-card .et-slot-prenom { font-size: 16px !important;}

/* --- GESTION DES NOMS TROP LONGS (LES ...) --- */
#et-export-card .et-slot-nom,
#et-export-card .et-slot-prenom {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important; /* LIGNE CRUCIALE : Interdit au texte de forcer l'élargissement */
    white-space: nowrap !important; /* Interdit au texte de passer sur 2 lignes */
    overflow: hidden !important;    /* Cache ce qui dépasse */
    text-overflow: ellipsis !important; /* Ajoute les ... à la fin */
    box-sizing: border-box !important;
}

/* 1ère ligne (R4, Central, Pointu) : Remontée vers le filet */
#et-export-card .slot-r4-1 { top: 26% !important; left: 81% !important; } 
#et-export-card .slot-central-1 { top: 26% !important; left: 53% !important; } 
#et-export-card .slot-pointu { top: 26% !important; left: 25% !important; }

/* 2ème ligne (R4, Central, Passeur) : Écartée dans la zone arrière */
#et-export-card .slot-r4-2 { top: 65% !important; left: 25% !important; } 
#et-export-card .slot-central-2 { top: 65% !important; left: 53% !important; } 
#et-export-card .slot-passeur { top: 65% !important; left: 81% !important; }

/* Libéro : Placé dans le coin inférieur droit, sur la bordure */
#et-export-card .slot-libero { top: 90% !important; left: 100% !important; }

/* On cache les pseudo-éléments qui font planter la génération de l'image */
#et-export-card .et-terrain-visuel::before,
#et-export-card .et-terrain-visuel::after {
    display: none !important;
}

.et-export-footer {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

/* On l'affiche uniquement si l'écran fait moins de 768px (Téléphones et petites tablettes) */
@media (max-width: 768px) {
    /* ENCART HORIZONTAL (BAS DE PAGE - MOBILE UNIQUEMENT) */
    .et-encart-bottom {
        display: block;
        width: 100%;
        margin: 20px auto 10px auto;
        padding: 0 10px;
        box-sizing: border-box;
        text-align: center;
        position: relative;
        z-index: 3;
    }

    .et-encart-bottom a {
        display: block;
        width: 100%;
        text-decoration: none;
    }

    .et-encart-bottom img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    .et-encart-side {
        display: none;
    }
    .et-title-main { font-size: 32px; }
    .et-subtitle-bottom { font-size: 15px; }
    .et-hero-banner { min-height: 250px; }
    .et-layout { flex-direction: column; }
    .et-zone-vote { width: 95%; }
    .et-grille-joueurs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .et-carte { padding: 15px 5px; }
    .et-carte-nom { font-size: 14px; }
    .et-carte-logo { width: 50px; height: 50px; margin-bottom: 8px; }

    .et-grille-joueurs { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .et-carte { 
        padding: 15px 5px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important; /* Force la carte à pouvoir rétrécir */
    }
    /* Ajustement des tailles de texte sur mobile pour éviter qu'ils ne forcent l'élargissement */
    .et-carte-nom {
        font-size: 13px !important;
    }
    .et-carte-prenom, .et-carte-club {
        font-size: 11px !important;
    }
    .et-navigation {
        width: calc(100% - 20px) !important; /* même espace que les 10px de padding de .et-col-etapes */
        max-width: 100% !important;
        margin: 15px auto 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Les boutons se partagent l'espace et rétrécissent si besoin */
    .et-btn, .et-btn-prev, .et-btn-next, .et-btn-submit { 
        flex: 1 1 0% !important; /* Force les boutons à avoir exactement la même largeur flexible (50/50) */
        min-width: 0 !important; /* Évite qu'ils ne bloquent sur une taille minimale */
        padding: 10px 5px !important; /* Réduction du padding pour gagner de la place */
        font-size: 12px !important; /* Texte légèrement plus petit pour que ça passe sur tous les téléphones */
        white-space: nowrap !important; /* Évite que le texte ne se coupe en deux */
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }

    /* Forcer le centrage parfait du conteneur principal des votes */
    .et-layout, 
    .et-zone-vote, 
    .et-col-etapes {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important; /* Centre parfaitement le bloc */
        padding: 0 10px !important; /* Applique exactement le même espace à gauche et à droite (10px) */
        box-sizing: border-box !important; /* Assure que le padding ne fait pas déborder le bloc */
    }

    /* S'assurer que le contenu des étapes prend 100% de ce conteneur centré */
    .et-etape-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .footer-signature {
        margin: 0 auto 20px auto !important; /* Le 'auto' remplace les 120px et centre parfaitement */
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        padding-right: 0 !important;
        order: 2 !important;
    }

    .et-main-vote-wrapper {
        margin-top: -40px;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Donner de l'espace en bas du terrain pour éviter le chevauchement 3D */
    .et-col-terrain {
        margin-bottom: 80px !important; 
    }

    /* Réduction proportionnelle du terrain et de tout ce qu'il contient */
    .et-terrain-visuel {
        width: 100% !important; 
        max-width: 85vw !important; /* Empêche le terrain de toucher les bords sur les très petits écrans */
        transform: scale(0.90) rotateX(20deg) !important; 
        margin-top: -15px !important; 
    }

    /* Ajustement des slots (joueurs) sur le terrain pour les petits écrans */
    .et-slot {
        width: 80px !important; /* Plus petit (au lieu de 100px) */
    }
    .et-slot-visuel {
        width: 50px !important; /* Logo plus petit (au lieu de 60px) */
        height: 50px !important;
        margin: 0 auto 4px auto !important;
    }
    .et-slot-badge {
        width: 22px !important; /* Pastille du poste plus petite */
        height: 22px !important;
        font-size: 10px !important;
        top: -2px !important;
        right: -5px !important;
    }
    .et-slot-nom {
        font-size: 12px !important; /* Police réduite */
    }
    .et-slot-prenom {
        font-size: 10px !important; /* Police réduite */
    }

    .et-terrain-titre {
        margin-top: -20px !important;
    }

    .et-message-succes {
        padding: 10px 20px;
        min-height: 150px;
    }

    .et-message-succes p {
        font-size: 15px;
    }

    .et-message-succes h2 {
        font-size: 32px;
    }

    .et-grille-joueurs { 
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important; 
        gap: 10px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .et-hero-content {
        transform: translateY(-50px) !important;
    }

    /* --- RÉORGANISATION DE L'ÉCRAN DE SUCCÈS --- */
    .et-succes-mobile-text {
        display: block !important; /* Afficher le texte en HAUT du layout */
    }
    .et-succes-mobile-text h2 { font-size: 32px; }
    .et-succes-mobile-text p { font-size: 15px; }
    
    .et-succes-desktop-text {
        display: none !important; /* Cacher le texte en BAS pour éviter le doublon */
    }
    
    /* On retire le gros fond gris pour ne garder que le bouton proprement en bas */
    .et-message-succes {
        padding: 0 !important;
        min-height: auto !important;
        background: transparent !important;
    }
    
    /* On remonte un peu le bouton vers le terrain */
    .et-btn-partager {
        margin-top: 0 !important;
        font-size: 18px !important;
    }
}