/* css/presentation.css */

/* =============================================
   STYLES SPÉCIFIQUES À CHAQUE TYPE DE SLIDE
   ============================================= */

/* === SLIDE TITRE (Hero avec image de fond) === */
.slide-title-hero .hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(10, 14, 39, 0.4) 0%,
        rgba(10, 14, 39, 0.65) 100%
    );
}

.slide-title-hero h1 {
    font-size: clamp(3.5rem, 8vw, 7rem);
    color: var(--color-white);
    text-shadow: var(--shadow-text);
    margin-bottom: 0.15em;
}

.slide-title-hero .subtitle {
    font-family: var(--font-title);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--color-text-on-dark-muted);
    letter-spacing: 0.04em;
}

.slide-title-hero .author-tag {
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: 8px 28px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* === SLIDES SPLIT-SCREEN === */

/* Fond dégradé selon le thème de chaque slide */
.slide-split .split-text {
    background: var(--gradient-sky);
}

/* Slide "Qu'est-ce qu'un hibou" */
#slide-difference .split-text {
    background: linear-gradient(160deg, #ede9fe 0%, #ddd6fe 50%, #c4b5fd 100%);
}

/* Slide "Super-Prédateur" */
#slide-predateur .split-text {
    background: linear-gradient(160deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
}

/* Slide "Alimentation" */
#slide-alimentation .split-text {
    background: var(--gradient-earth);
}

/* Slide "Habitat" */
#slide-habitat .split-text {
    background: linear-gradient(160deg, #d1fae5 0%, #a7f3d0 50%, #6ee7b7 100%);
    position: relative;
    overflow: hidden;
}

/* Texture de feuillage en filigrane (Idée 6) */
#slide-habitat .split-text::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cg fill='none' stroke='%23065f46' stroke-width='1.5' stroke-linecap='round'%3E%3C!-- Branche principale -->%3Cpath d='M250 480 Q245 350 200 260 Q160 180 80 100'/%3E%3C!-- Sous-branches gauche -->%3Cpath d='M215 380 Q180 340 150 300'/%3E%3Cpath d='M205 340 Q170 295 130 265'/%3E%3Cpath d='M195 300 Q165 255 135 235'/%3E%3Cpath d='M185 260 Q155 215 110 195'/%3E%3C!-- Sous-branches droite -->%3Cpath d='M220 390 Q255 355 280 320'/%3E%3Cpath d='M210 350 Q248 310 275 275'/%3E%3Cpath d='M198 310 Q238 268 260 240'/%3E%3Cpath d='M186 270 Q228 228 248 202'/%3E%3C!-- Feuilles gauches -->%3Cellipse cx='148' cy='295' rx='18' ry='10' transform='rotate(-30 148 295)'/%3E%3Cellipse cx='126' cy='260' rx='16' ry='9' transform='rotate(-45 126 260)'/%3E%3Cellipse cx='112' cy='228' rx='15' ry='8' transform='rotate(-40 112 228)'/%3E%3Cellipse cx='99' cy='192' rx='14' ry='8' transform='rotate(-55 99 192)'/%3E%3C!-- Feuilles droites -->%3Cellipse cx='282' cy='316' rx='18' ry='10' transform='rotate(25 282 316)'/%3E%3Cellipse cx='278' cy='272' rx='16' ry='9' transform='rotate(35 278 272)'/%3E%3Cellipse cx='262' cy='237' rx='15' ry='8' transform='rotate(28 262 237)'/%3E%3Cellipse cx='250' cy='200' rx='14' ry='8' transform='rotate(42 250 200)'/%3E%3C!-- Deuxième branche -->%3Cpath d='M270 480 Q280 380 330 290 Q370 210 430 130'/%3E%3Cpath d='M305 370 Q335 335 355 300'/%3E%3Cpath d='M318 328 Q352 290 372 255'/%3E%3Cpath d='M265 380 Q235 345 215 315'/%3E%3Cellipse cx='358' cy='296' rx='17' ry='9' transform='rotate(20 358 296)'/%3E%3Cellipse cx='375' cy='251' rx='15' ry='8' transform='rotate(32 375 251)'/%3E%3Cellipse cx='213' cy='310' rx='16' ry='9' transform='rotate(-25 213 310)'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 400px 400px;
}

/* Le contenu reste au-dessus de la texture */
#slide-habitat .split-text > * {
    position: relative;
    z-index: 1;
}

/* Slide "Espèces" */
#slide-especes .split-text {
    background: linear-gradient(160deg, #fce7f3 0%, #fbcfe8 50%, #f9a8d4 100%);
}

/* === Idée 3 : Fonds Dégradés Animés === */
.slide-split .split-text,
.slide-centered {
    background-size: 200% 200% !important;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Typographie Split */
.slide-split h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.slide-split p {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    color: var(--color-text-light);
}

.slide-split ul {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.slide-split li {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    color: var(--color-text);
    padding: 10px 0 10px 2.2rem;
    position: relative;
    line-height: 1.6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.slide-split li:last-child {
    border-bottom: none;
}

.slide-split li::before {
    content: '🦉';
    position: absolute;
    left: 0;
    top: 10px;
}

/* Petit badge/tag sur l'image pour du contexte */
.split-image .image-tag {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--surface-dark);
    backdrop-filter: blur(10px);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 50px;
    z-index: 2;
}

/* === SLIDES CENTRÉS (texte seul avec fond dégradé) === */
.slide-centered {
    background: var(--gradient-sky);
}

#slide-protection {
    background: linear-gradient(160deg, #d1fae5 0%, #99f6e4 50%, #5eead4 100%);
}

.slide-centered h2 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.slide-centered p {
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

.slide-centered ul {
    list-style: none;
    text-align: left;
    max-width: 750px;
    margin: var(--spacing-sm) auto 0;
}

.slide-centered li {
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    color: var(--color-text);
    padding: 12px 0 12px 2.5rem;
    position: relative;
    line-height: 1.65;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.slide-centered li:last-child {
    border-bottom: none;
}

.slide-centered li::before {
    content: '🦉';
    position: absolute;
    left: 0;
    top: 12px;
}

/* === SLIDE SON (Hero nocturne) === */
.slide-sound .hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(10, 14, 39, 0.3) 0%,
        rgba(13, 17, 55, 0.75) 100%
    );
}

.slide-sound h2 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--color-white);
    text-shadow: var(--shadow-text);
}

.slide-sound p {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    color: var(--color-text-on-dark-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === Bouton Son === */
.sound-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 600;
    transition: var(--transition-fast);
    margin-top: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

/* Ondulation lumineuse au hover */
.sound-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.sound-btn:hover::after {
    transform: translateX(100%);
}

.sound-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sound-btn:active {
    transform: scale(0.97);
}

.sound-btn.playing {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

/* === SLIDE MERCI (Hero) === */
.slide-merci .hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(10, 14, 39, 0.35) 0%,
        rgba(10, 14, 39, 0.6) 100%
    );
}

.slide-merci h1 {
    font-size: clamp(4rem, 9vw, 8rem);
    color: var(--color-white);
    text-shadow: var(--shadow-text);
}

.slide-merci .subtitle {
    font-family: var(--font-title);
    font-size: clamp(1.3rem, 2.5vw, 2.2rem);
    color: var(--color-text-on-dark-muted);
    font-weight: 400;
}

/* === ANIMATIONS D'APPARITION DES ÉLÉMENTS (Idée 7 : Transition Fluide) === */

/* Éléments internes qui apparaissent progressivement */
.slide.active [data-anim] {
    animation: reveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.slide.active [data-anim="1"] { animation-delay: 0.1s; }
.slide.active [data-anim="2"] { animation-delay: 0.25s; }
.slide.active [data-anim="3"] { animation-delay: 0.4s; }
.slide.active [data-anim="4"] { animation-delay: 0.55s; }
.slide.active [data-anim="5"] { animation-delay: 0.7s; }

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        clip-path: inset(100% 0 0 0); /* Cache l'élément du bas vers le haut */
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(-20% -20% -20% -20%); /* Révèle avec marge pour les ombres */
    }
}

/* Animation spécifique pour les images split */
.slide-split.active .split-image img {
    animation: imgZoomIn 0.9s var(--ease-out) both;
}

@keyframes imgZoomIn {
    from {
        opacity: 0;
        transform: scale(1.12);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation spécifique pour l'image du hibou en vol (Super-Prédateur) */
#slide-predateur.active .split-image img {
    /* Combine l'animation d'apparition et l'animation de vol continue */
    animation: 
        imgZoomIn 0.9s var(--ease-out) both,
        flyingOwl 6s ease-in-out 0.9s infinite alternate;
    transform-origin: center center;
}

@keyframes flyingOwl {
    0% {
        transform: translateY(0px) scale(1) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) scale(1.02) rotate(1deg);
    }
    100% {
        transform: translateY(5px) scale(1) rotate(-0.5deg);
    }
}

/* === Idée 2 : Lucioles (Fireflies) === */
.firefly {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    animation: floatParticle linear infinite, glowParticle linear infinite alternate;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-120px) translateX(60px);
    }
}

@keyframes glowParticle {
    0% {
        opacity: 0.1;
        box-shadow: 0 0 5px 1px rgba(255, 255, 255, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 15px 4px rgba(255, 255, 255, 0.8);
    }
    100% {
        opacity: 0.1;
        box-shadow: 0 0 5px 1px rgba(255, 255, 255, 0.2);
    }
}
