/* ========================================
   STYLES GLOBAUX - La Plume de Jean-Poule
   ======================================== */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --color-primary: #4ECDC4;
    --color-primary-dark: #45B7AA;
    --color-secondary: #FF6B6B;
    --color-secondary-dark: #E55A5A;
    --color-accent: #FFE66D;
    --color-success: #98FB98;
    --color-error: #FF6B6B;

    /* Couleurs pastels décoratives */
    --color-pastel-pink: #FFB6C1;
    --color-pastel-blue: #87CEEB;
    --color-pastel-green: #98FB98;
    --color-pastel-purple: #DDA0DD;
    --color-pastel-yellow: #F0E68C;
    --color-pastel-cyan: #B0E0E6;

    /* Texte et fond */
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-bg-white: #FFFFFF;
    --color-bg-overlay: rgba(255, 255, 255, 0.9);

    /* Ombres */
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-text: 3px 3px 0 var(--color-accent), 6px 6px 0 rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.3s ease;
}

html,
body {
    height: 100%;
    overflow: hidden;
    /* Pas de scroll sur les pages */
}

body {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d299c2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text);
}

/* Police pour les lettres du jeu */
.letter-display-font {
    font-family: 'IBM Plex Mono', 'Roboto Mono', 'Consolas', monospace;
    font-weight: 700;
}

/* ========================================
   CONTENEUR DE PAGE (plein écran, centré)
   ======================================== */

.page-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 5;
}

/* ========================================
   ÉLÉMENTS DÉCORATIFS
   ======================================== */

.corner-image {
    position: fixed;
    width: 180px;
    height: 180px;
    object-fit: contain;
    z-index: 1;
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.2));
    pointer-events: none;
}

.corner-image.top-left {
    top: 15px;
    left: 15px;
}

.corner-image.top-right {
    top: 15px;
    right: 15px;
}

.corner-image.bottom-left {
    bottom: 50px;
    left: 15px;
}

.corner-image.bottom-right {
    bottom: 50px;
    right: 15px;
}

/* Bulles */
.bubble {
    position: fixed;
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.bubble-1 {
    width: 60px;
    height: 60px;
    background: var(--color-pastel-pink);
    top: 15%;
    left: 8%;
}

.bubble-2 {
    width: 50px;
    height: 50px;
    background: var(--color-pastel-blue);
    top: 70%;
    left: 5%;
}

.bubble-3 {
    width: 80px;
    height: 80px;
    background: var(--color-pastel-green);
    top: 20%;
    right: 6%;
}

.bubble-4 {
    width: 40px;
    height: 40px;
    background: var(--color-pastel-purple);
    top: 55%;
    right: 10%;
}

.bubble-5 {
    width: 55px;
    height: 55px;
    background: var(--color-pastel-yellow);
    bottom: 25%;
    left: 12%;
}

.bubble-6 {
    width: 70px;
    height: 70px;
    background: var(--color-pastel-cyan);
    bottom: 30%;
    right: 8%;
}

/* Étoiles */
.star {
    position: fixed;
    font-size: 24px;
    z-index: 0;
    animation: twinkle 2s ease-in-out infinite;
    pointer-events: none;
}

.star-1 {
    top: 8%;
    left: 25%;
    animation-delay: 0s;
}

.star-2 {
    top: 12%;
    right: 20%;
    animation-delay: 0.5s;
}

.star-3 {
    bottom: 18%;
    left: 20%;
    animation-delay: 1s;
}

.star-4 {
    bottom: 22%;
    right: 25%;
    animation-delay: 1.5s;
}

.star-5 {
    top: 35%;
    left: 5%;
    animation-delay: 0.3s;
}

.star-6 {
    top: 40%;
    right: 4%;
    animation-delay: 0.8s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ========================================
   BOUTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.btn-primary {
    background: var(--color-success);
    color: var(--color-text);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--color-bg-white);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.3rem;
}

.btn-blink {
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(152, 251, 152, 0.7);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(152, 251, 152, 0);
    }
}

/* ========================================
   FOOTER
   ======================================== */

.home-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.6);
    z-index: 50;
}

.home-footer a {
    color: var(--color-primary-dark);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.home-footer a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-15px);
    }

    40% {
        transform: translateX(15px);
    }

    60% {
        transform: translateX(-10px);
    }

    80% {
        transform: translateX(10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ========================================
   UTILITAIRES
   ======================================== */

.hidden {
    display: none !important;
}

.input-error {
    border-color: var(--color-error) !important;
    animation: shake 0.4s ease;
}

/* ========================================
   CONFETTIS
   ======================================== */

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 1000;
    pointer-events: none;
}

/* ========================================
   VIDEO REWARD
   ======================================== */

.video-reward-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.video-reward-container {
    position: relative;
    max-width: 80%;
    max-height: 70%;
}

.video-reward-container video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
}

.video-reward-title {
    color: var(--color-accent);
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}