/*
Theme Name: En Attendant Festival
Description: Thème pour le site du festival de cinéma "En Attendant"
Version: 1.0
Author: Votre nom
*/

/* Styles du thème */
:root {
    --color-lin: rgb(237, 232, 228); /* #EDE8E4 */
    --color-fuschia: rgb(216, 95, 145); /* #D85F91 */
    --color-pacific: rgb(224, 167, 71); /* #E0A747 */
    --color-carotte: rgb(228, 98, 40); /* #E46228 */
    --color-olive: rgb(177, 169, 63); /* #B1A93F */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--color-lin);
    font-family: 'Special Elite', 'Courier New', monospace;
    color: var(--color-carotte);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.film-strip-left, .film-strip-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    background: repeating-linear-gradient(
        0deg,
        var(--color-pacific) 0px,
        var(--color-pacific) 20px,
        transparent 20px,
        transparent 40px
    );
    z-index: 1;
    animation: film-scroll 1s linear infinite;
}

.film-strip-left {
    left: 0;
}

.film-strip-right {
    right: 0;
}

.film-strip-left::before, .film-strip-right::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 8px,
        var(--color-olive) 8px,
        var(--color-olive) 12px
    );
    pointer-events: none;
    z-index: 2;
    animation: film-scroll 1s linear infinite;
}

@keyframes film-scroll {
    0% { background-position-y: 0; }
    100% { background-position-y: 40px; }
}

.image-container {
    position: relative;
    z-index: 2;
    animation: brightness-vibration 2s ease-in-out infinite, shake 2s infinite linear;
    text-align: center;
}

.main-image {
    max-width: 80%;
    max-height: 60vh;
    object-fit: contain;
    filter: brightness(1);
    transition: filter 0.1s ease;
}

@keyframes brightness-vibration {
    0%, 100% {
        filter: brightness(1);
    }
    25% {
        filter: brightness(1.1);
    }
    50% {
        filter: brightness(0.9);
    }
    75% {
        filter: brightness(1.05);
    }
}

@keyframes shake {
    0% { transform: translate(0px, 0px) rotate(0deg); }
    10% { transform: translate(-0.5px, 0.5px) rotate(-0.2deg); }
    20% { transform: translate(-0.5px, -0.5px) rotate(0.2deg); }
    30% { transform: translate(0.5px, 0.5px) rotate(0.1deg); }
    40% { transform: translate(0.5px, -0.5px) rotate(-0.1deg); }
    50% { transform: translate(-0.5px, 0.5px) rotate(0.15deg); }
    60% { transform: translate(0.5px, 0.5px) rotate(-0.15deg); }
    70% { transform: translate(-0.5px, 0.5px) rotate(0.1deg); }
    80% { transform: translate(0.5px, -0.5px) rotate(-0.1deg); }
    90% { transform: translate(0.5px, 0.5px) rotate(0.05deg); }
    100% { transform: translate(0px, 0px) rotate(0deg); }
}

.countdown {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--color-fuschia);
    display: block;
    font-family: 'Special Elite', 'Courier New', monospace;
}

.countdown-number.days {
    color: var(--color-fuschia);
}

.countdown-number.hours {
    color: var(--color-pacific);
}

.countdown-number.minutes {
    color: var(--color-carotte);
}

.countdown-number.seconds {
    color: var(--color-olive);
}

.countdown-label {
    font-size: 0.9em;
    color: var(--color-carotte);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Special Elite', 'Courier New', monospace;
}

.festival-title {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    font-weight: bold;
    color: var(--color-fuschia);
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(237, 232, 228, 0.8), 0 1px 0 var(--color-fuschia);
    z-index: 10;
    text-align: center;
    font-family: 'Special Elite', 'Courier New', monospace;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    line-height: 1.2;
}

.mot-rouge {
    position: relative;
    display: inline-block;
    color: #d32d2f;
}

.rayure-main {
    position: absolute;
    left: 0;
    width: 100%;
    height: 28px;
    pointer-events: none;
    z-index: 1;
}

.ligne-rouge-vert {
    display: inline-block;
    white-space: nowrap;
}

.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(228, 98, 40, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(177, 169, 63, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 4;
    animation: grain-move 20s linear infinite;
}

@keyframes grain-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Sauts de ligne du titre visibles uniquement sur mobile */
.mobile-br {
    display: none;
}

@media (max-width: 600px) {
    .mobile-br {
        display: inline;
    }
}

@media (max-width: 768px) {
    .film-strip-left, .film-strip-right {
        width: 40px;
    }
    
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .countdown-number {
        font-size: 2em;
    }
}
