/* Variables CSS pour la cohérence et la maintenabilité */
:root {
    /* Couleurs principales */
    --color-primary: #488487;
    --color-secondary: #42d5d1;
    --color-primary-gradient: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    
    /* Couleurs de texte et fond */
    --color-text: #2d3436;
    --color-text-light: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-lighter: #e9ecef;
    --color-bg-gradient: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg-lighter) 100%);
    
    /* Couleurs d'interface */
    --color-button-default: #636e72;
    --color-button-success: var(--color-primary);
    --color-button-danger: #e17055;
    --color-button-danger-dark: #d63031;
    
    /* Ombres */
    --shadow-sm: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-standard: all 0.3s ease;
    --transition-slow: all 0.4s ease;
    
    /* Espacements */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Rayons de bordure */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Styles d'accessibilité */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--space-sm);
    z-index: 100;
    transition: var(--transition-standard);
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--color-secondary);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--color-bg-gradient);
    min-height: 100vh;
    color: var(--color-text);
    line-height: 1.6;
}

header {
    background: var(--color-primary-gradient);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(72, 132, 135, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.logo {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover { transform: scale(1.05); }

.logo-icon {
    display: inline-block;
    background-color: white;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-icon img {
    display: block;
    height: auto;
    max-height: 80px;
}

.ad-banner {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #868686;
    font-weight: 500;
}

nav {
    background: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.nav-button {
    background: var(--color-button-default);
    color: var(--color-text-light);
    border: 2px solid var(--color-button-default);
    padding: 1.2rem var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary-gradient);
    transition: bottom 0.3s ease;
    z-index: 1;
}

.nav-button span { position: relative; z-index: 2; }

.nav-button:hover::before, .nav-button.active::before { bottom: 0; }

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 132, 135, 0.3);
}

.nav-button:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
}

.nav-button.active {
    background: var(--color-primary-gradient);
    border-color: var(--color-secondary);
}

.hero {
    padding: 4rem 0;
    display: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-image {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(72, 132, 135, 0.1);
    display: none;
}

.section.active { display: block; }

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-xl);
    color: var(--color-text);
    text-align: center;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--color-primary-gradient);
    margin: 1.5rem auto;
    border-radius: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Layout spécifique pour la grille principale */
.main-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 colonnes égales : selectbox + selectbox + bouton */
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: stretch; /* ✅ CORRECTION : stretch au lieu de end pour même hauteur */
}

.main-form-grid .form-group {
    margin-bottom: 0; /* ✅ CORRECTION : Supprimer la marge pour alignement parfait */
}

/* Responsive : Vertical sur mobile */
@media (max-width: 768px) {
    .main-form-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile = vertical */
        gap: 1rem;
    }
}

.form-group { margin-bottom: 2rem; }

.form-label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #2d3436;
    font-size: 1.1rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--color-bg-lighter);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-standard);
    background: white;
    font-family: inherit;
}

.form-input:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(72, 132, 135, 0.1);
    transform: translateY(-1px);
}

.form-select {
    cursor: pointer;
    background: var(--color-primary);
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 1.1rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    border: 2px solid var(--color-primary);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-select:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(72, 132, 135, 0.2);
    transform: translateY(-1px);
}

.form-select option {
    background: #488487;
    color: white;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-select option:first-child {
    font-size: 0.96rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #42d5d1;
}

.mega-start-button {
    background: var(--color-primary-gradient);
    color: var(--color-text-light);
    border: none;
    padding: 1.2rem; /* ✅ CORRECTION : Même padding que les form-select */
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-slow);
    display: block;
    margin: 0;
    width: 100%;
    height: auto;
    max-width: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    min-height: auto; /* ✅ CORRECTION : Auto pour s'adapter à la hauteur des select */
}

.mega-start-button::before {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: bottom 0.5s;
}

.mega-start-button:hover::before { bottom: 0; }

.mega-start-button:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(72, 132, 135, 0.5);
}

.mega-start-button:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
}

.mega-start-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    background: #868686 !important;
    box-shadow: none !important;
}

.mega-start-button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.main-button {
    background: var(--color-primary-gradient);
    color: var(--color-text-light);
    border: none;
    padding: 1.2rem 3rem;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-standard);
    display: block;
    margin: var(--space-lg) auto;
    min-width: 250px;
    box-shadow: 0 4px 15px rgba(72, 132, 135, 0.3);
    position: relative;
    overflow: hidden;
}

.main-button::before {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: bottom 0.5s;
}

.main-button:hover::before { bottom: 0; }

.main-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(72, 132, 135, 0.4);
}

.main-button:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
}

.siesta-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 1000;
    display: none;
}

.player-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: black;
    transition: opacity 1s ease-in-out;
}

.player-active {
    opacity: 1;
    z-index: 1;
}

.player-standby {
    opacity: 0;
    z-index: 0;
}

/* =================================================================
   OVERLAY PUBLICITAIRE — Affiché après 20% de la sieste
   ================================================================= */
/* =================================================================
   OVERLAY PUBLICITAIRE — Bannière haut + 3 carrés + Bannière bas
   ================================================================= */
.siesta-ads-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.siesta-ads-overlay.active {
    display: flex;
    animation: adsSlowFadeIn 3s ease-in-out forwards;
}

@keyframes adsSlowFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.ad-slot {
    pointer-events: auto;
    opacity: 0;
    animation: adSlotAppear 2s ease-in-out forwards;
    width: 100%;
    max-width: 728px;
}

.ad-slot-top { animation-delay: 0s; }
.ad-slot-squares { animation-delay: 1s; }
.ad-slot-bottom { animation-delay: 2s; }

@keyframes adSlotAppear {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 3 carrés au centre */
.ad-slot-squares {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
}

.ad-square {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .siesta-ads-overlay {
        padding: 10px;
    }

    .ad-slot-squares {
        gap: 10px;
    }

    .ad-square {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .ad-slot-squares {
        flex-direction: column;
        align-items: center;
    }

    .ad-square {
        width: 100%;
        max-width: 320px;
    }
}

.manual-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #488487, #42d5d1);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.manual-play-button:hover {
    background: linear-gradient(135deg, #42d5d1, #488487);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.manual-play-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.player-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 1001;
}

.timer-display {
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.8rem;
    font-weight: bold;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.start-timer-button {
    background: linear-gradient(135deg, #488487, #42d5d1);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 132, 135, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-timer-button:hover {
    background: linear-gradient(135deg, #42d5d1, #488487);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(72, 132, 135, 0.6);
}

.start-timer-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    background: #868686 !important;
}

.stop-button {
    background: #e17055;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(225, 112, 85, 0.4);
}

.stop-button:hover {
    background: #d63031;
    transform: scale(1.05);
}

.wake-up-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.80), rgba(225, 112, 85, 0.80));
    backdrop-filter: blur(5px);
    z-index: 1002;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.wake-up-message {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 3rem;
    animation: pulse 2s ease-in-out infinite;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    font-weight: 700;
}

.wake-up-button {
    background: #488487;
    color: white;
    border: none;
    padding: 2rem 4rem;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    animation: bounce 1s ease-in-out infinite;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.siesta-end-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #488487, #42d5d1);
    z-index: 2000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.siesta-end-message {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: gentle-pulse 2s ease-in-out infinite;
    max-width: 80%;
    line-height: 1.3;
}

.yawn-game { text-align: center; }

/* Nouvelle mise en page à deux colonnes */
.yawn-game-container {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Colonne gauche 1/3, colonne droite 2/3 */
    gap: 2rem;
    margin: 2rem 0;
    align-items: start;
}

/* Colonne de gauche (sidebar) */
.yawn-sidebar {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 4px solid var(--color-secondary);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: space-between; /* Répartir l'espace verticalement */
}

/* Colonne de droite (contenu principal) */
.yawn-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.yawn-level {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #488487;
    font-weight: bold;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Instruction du niveau */
.yawn-instruction {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: rgba(72, 132, 135, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* Styles pour la barre de progression */
.yawn-progress-container {
    width: 100%;
    margin-bottom: 1.5rem;
}

.yawn-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

.yawn-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.yawn-progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #636e72;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.yawn-progress-step.active {
    background-color: var(--color-secondary);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(66, 213, 209, 0.5);
}

.yawn-progress-step.completed {
    background-color: var(--color-primary);
    color: white;
}

/* Animation pour le changement de niveau */
.level-transition {
    animation: levelTransition 0.8s ease;
}

@keyframes levelTransition {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0; }
    51% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.yawn-countdown {
    font-size: 6rem;
    font-weight: 900;
    color: #42d5d1;
    margin: 1rem 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 1rem;
}

.yawn-description {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 1.2rem;
    line-height: 1.6;
    transition: transform 0.5s ease, opacity 0.5s ease;
    color: #2d3436;
    font-size: 0.95rem;
    margin: 0;
}

.yawn-description p {
    margin-bottom: 0.8rem;
}

.yawn-description p:last-child {
    margin-bottom: 0;
}

.yawn-description.level-transition {
    animation: levelTransition 0.8s ease;
}

.yawn-content {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 0.5rem;
    width: 100%;
    height: 100%;
}

.yawn-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    object-fit: contain;
}

.yawn-image-large {
    max-width: 900px;
    max-height: 700px;
    border-radius: 20px;
    margin: 1rem 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Overlay plein écran pour le défi du bâillement */
.yawn-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: black;
    display: none;
    align-items: center;
    justify-content: center;
    animation: yawnFadeIn 0.5s ease-in-out;
}

.yawn-fullscreen-overlay.active {
    display: flex;
}

@keyframes yawnFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.yawn-fullscreen-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yawn-fullscreen-counter {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.yawn-video {
    width: 100%;
    height: 450px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.yawn-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.yawn-video-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.game-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.game-button {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
}

.success-button {
    background: linear-gradient(135deg, #488487, #42d5d1);
    color: white;
}

.success-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(72, 132, 135, 0.4);
}

.fail-button {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.fail-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(225, 112, 85, 0.4);
}

/* Styles responsifs pour la mise en page à deux colonnes */
@media (max-width: 992px) {
    .yawn-game-container {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .yawn-game-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .yawn-sidebar {
        order: 2;
    }
    
    .yawn-main-content {
        order: 1;
    }
    
    .yawn-content {
        min-height: 300px;
    }
    
    .yawn-countdown {
        font-size: 4rem;
        min-height: 80px;
    }
}

.game-end-message {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    text-align: center;
}

.victory-message { border-left: 6px solid #488487; }
.defeat-message { border-left: 6px solid #e17055; }

/* Styles améliorés pour le pied de page */
.footer {
    background: linear-gradient(135deg, #2d3436, #636e72);
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-secondary);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-link, .admin-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition-standard);
    position: relative;
}

.footer-link::after, .admin-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: var(--transition-standard);
}

.footer-link:hover, .admin-link:hover {
    color: var(--color-secondary);
}

.footer-link:hover::after, .admin-link:hover::after {
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    transition: var(--transition-standard);
}

.social-icon:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        align-items: center;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes countdown {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

.countdown-animate { animation: countdown 1s ease-in-out; }

/* Réduction des animations pour les utilisateurs qui préfèrent un mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-delay: 0s !important;
    }
    
    .mega-start-button:hover,
    .main-button:hover,
    .nav-button:hover {
        transform: none !important;
    }
    
    .countdown-animate,
    .wake-up-message,
    .wake-up-button,
    .siesta-end-message {
        animation: none !important;
    }
}

@media (max-width: 1024px) {
    .header-content { flex-direction: column; gap: 2rem; text-align: center; }
    .ad-banner { width: 100%; max-width: 728px; height: 90px; }
}

@media (max-width: 768px) {
    .nav-content { grid-template-columns: 1fr; padding: 0 1rem; }
    .container { padding: 2rem 1rem; }
    .section { padding: 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .mega-start-button { 
        font-size: 1rem; 
        padding: 1.12rem; /* ✅ CORRECTION : Même padding simplifié */
        letter-spacing: 0.8px; 
    }
    .wake-up-message { font-size: 2.5rem; }
    .player-controls { bottom: 20px; right: 20px; flex-direction: column; gap: 0.5rem; }
    .timer-display { font-size: 1.4rem; padding: 0.8rem 1.5rem; }
    .game-buttons { flex-direction: column; align-items: center; }
    .yawn-countdown { font-size: 4rem; }
    .ad-banner { width: 320px; height: 50px; font-size: 0.9rem; }
    .siesta-end-message { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .section { padding: 1.5rem; }
    .main-button { min-width: auto; width: 100%; padding: 1rem 2rem; }
    .mega-start-button { 
        font-size: 0.9rem; 
        padding: 0.84rem; /* ✅ CORRECTION : Même padding simplifié */
    }
    .section-title { font-size: 2rem; }
    .siesta-end-message { font-size: 1.4rem; }
}

/* ✅ NOUVELLES CLASSES POUR LA SÉPARATION COMPLÈTE */
.hidden {
    display: none !important;
}

.hero-image-container {
    text-align: center;
    margin: 2rem 0;
}

.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.main-hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    position: relative;
    opacity: 1;
}

/* Titre sur chaque image */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Navigation du carrousel (dots + play) */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1rem;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(150, 150, 150, 0.4);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(150, 150, 150, 0.7);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--primary-color, #6c5ce7);
    transform: scale(1.3);
}

/* Bouton Play/Pause */
.carousel-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(150, 150, 150, 0.5);
    background: transparent;
    color: rgba(150, 150, 150, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-play-btn:hover {
    border-color: var(--primary-color, #6c5ce7);
    color: var(--primary-color, #6c5ce7);
    transform: scale(1.1);
}

/* Quand le carrousel tourne (playing) → afficher pause, cacher play */
.carousel-play-btn.playing .play-icon {
    display: none;
}
.carousel-play-btn.playing .pause-icon {
    display: block;
}

/* Quand le carrousel est arrêté → afficher play, cacher pause */
.carousel-play-btn .play-icon {
    display: block;
}
.carousel-play-btn .pause-icon {
    display: none;
}

.secondary-button {
    background: #868686 !important;
}

.secondary-button:hover {
    background: #636e72 !important;
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    color: var(--color-text);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--color-primary);
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    border-left-color: #2ecc71;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification.warning {
    border-left-color: #f39c12;
}

.notification-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.notification-message {
    font-size: 0.9rem;
    opacity: 0.8;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #aaa;
    transition: color 0.2s ease;
    margin-left: 1rem;
}

.notification-close:hover {
    color: #555;
}

/* Styles pour les tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Styles pour le mode sombre */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-light: #1a1a1a;
        --color-bg-lighter: #2a2a2a;
        --color-text: #f5f5f5;
    }
    
    body {
        background: #1a1a1a;
        color: #f5f5f5;
    }
    
    .section {
        background: #2a2a2a;
        border-color: rgba(72, 132, 135, 0.3);
    }
    
    .form-input {
        background: #333;
        color: #f5f5f5;
        border-color: #444;
    }
    
    .form-input:focus {
        border-color: var(--color-secondary);
    }
    
    .notification {
        background: #2a2a2a;
        color: #f5f5f5;
    }
}