/* ╔══════════════════════════════════════════════════╗ */
/* ║               VARIABLES GLOBALES                 ║ */
/* ╚══════════════════════════════════════════════════╝ */
:root {
    --bg:     #0a0a0a;
    --text:   #f0ece4;
    --muted:  #6b6b6b;
    --border: #1e1e1e;
}

/* ╔══════════════════════════════════════════════════╗ */
/* ║                   TYPOGRAPHIES                   ║ */
/* ╚══════════════════════════════════════════════════╝ */

@font-face {
    font-family: 'Charine';
    src: url('Import/Typographie/Charine-DEMO.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'WonderfulButterfly';
    src: url('Import/Typographie/Wonderful-Butterfly.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* ╔══════════════════════════════════════════════════╗ */
/* ║                    BASE                          ║ */
/* ╚══════════════════════════════════════════════════╝ */

*, *::before, *::after {
    box-sizing: border-box;
}
/* évite le scrool horizontal de l'animation des barres */
html,
body {
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* wrapper principal posé par-dessus le fond aurora */
#site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                   HEADER                         ║ */
/* ╚══════════════════════════════════════════════════╝ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 50px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
    font-family: 'Charine', serif;
    overflow: hidden;
    }

#logo h2 {
    font-family: 'Charine', serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text);
}

/* ligne lumineuse animée sous le header */
header::after {
    content: '';
    position: absolute;
    left: -10%;
    bottom: -3px;
    width: 120%;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(240, 236, 228, 0.55) 0%,
        rgba(107, 107, 107, 0.2) 50%,
        transparent 100%
    );
    /* rend les bords flous */
    filter: blur(2px);
    animation: vague-header 7s ease-in-out infinite alternate;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                  NAVIGATION                      ║ */
/* ╚══════════════════════════════════════════════════╝ */
nav {
    display: flex;
    gap: 30px;
}

nav button {
    background: transparent;
    color: var(--text);
    border: none;
    padding: 0 0 8px 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    transition: opacity 0.2s;
    font-family: 'Charine', serif;
}

/* petit point qui apparaît sous le bouton actif */
nav button::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text);
    margin: 6px auto 0;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s, transform 0.2s;
}

nav button:hover {
    opacity: 0.6;
}

nav button.active::after {
    opacity: 1;
    transform: scale(1);
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                   RÉSEAUX                        ║ */
/* ╚══════════════════════════════════════════════════╝ */
#reseaux {
    display: flex;
    align-items: center;
    gap: 20px;
}

#reseaux a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

#reseaux a:hover {
    opacity: 0.4;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                    MAIN                          ║ */
/* ╚══════════════════════════════════════════════════╝ */
main {
    display: flex;
    flex: 1;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                  TIMELINE                        ║ */
/* ╚══════════════════════════════════════════════════╝ */
#timeline {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    font-family: 'WonderfulButterfly', cursive;
}

#timeline ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

#timeline li {
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    padding-left: 14px;
}

/* tiret affiché avant chaque date */
#timeline li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--muted);
    transition: color 0.2s;
}

#timeline li.active,
#timeline li:hover {
    color: var(--text);
}

#timeline li.active::before,
#timeline li:hover::before {
    color: var(--text);
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║               SECTION ACCUEIL                    ║ */
/* ╚══════════════════════════════════════════════════╝ */
#accueil {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 60px 0 60px 50px;
    overflow: hidden;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                   GALERIE                        ║ */
/* ╚══════════════════════════════════════════════════╝ */
.galerie {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-right: 50px;
    /* curseur "main fermée" quand on clique-glisse */
    cursor: grab;
    /* style de la barre de scroll (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.galerie:active {
    cursor: grabbing;
}

/* style de la barre de scroll (Chrome / Safari) */
.galerie::-webkit-scrollbar {
    height: 3px;
}

.galerie::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║               CARTE PROJET                       ║ */
/* ╚══════════════════════════════════════════════════╝ */

.carte-projet {
    flex-shrink: 0;
    width: 560px;
    height: 340px;
    border-radius: 4px;
    /* visible pour que l'aura (::before) puisse dépasser */
    overflow: visible;
    position: relative;
    cursor: pointer;
}

/* halo lumineux autour de la carte au survol */
.carte-projet::before {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 12px;
    opacity: 0;
    filter: blur(22px);
    transition: opacity 0.45s ease;
    z-index: 0;
    /* empêche l'aura de capturer les clics de souris */
    pointer-events: none;
}

.carte-projet:hover::before {
    opacity: 1;
}

.bg1::before { background: radial-gradient(ellipse at center, rgba(196, 168, 130, 0.45) 0%, transparent 70%); }
.bg2::before { background: radial-gradient(ellipse at center, rgba(143, 169, 160, 0.45) 0%, transparent 70%); }
.bg3::before { background: radial-gradient(ellipse at center, rgba(176, 122, 122, 0.45) 0%, transparent 70%); }
.bg4::before { background: radial-gradient(ellipse at center, rgba(122, 143, 176, 0.45) 0%, transparent 70%); }
.bg5::before { background: radial-gradient(ellipse at center, rgba(160, 155, 122, 0.45) 0%, transparent 70%); }
.bg6::before { background: radial-gradient(ellipse at center, rgba(143, 160, 122, 0.45) 0%, transparent 70%); }

/* contient l'image et clippe ce qui dépasse */
.carte-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
    /* empêche les effets visuels internes de déborder à l'extérieur */
    isolation: isolate;
}

.carte-projet:hover .carte-inner {
    transform: scale(1.04);
}

/* fond coloré derrière l'image */
.carte-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    opacity: 0.75;
    transition: opacity 0.4s;
    z-index: 0;
}

.carte-projet:hover .carte-bg {
    opacity: 1;
}

.bg1 .carte-bg { background: linear-gradient(160deg, #1a1208 0%, #c4a882 100%); }
.bg2 .carte-bg { background: linear-gradient(160deg, #0d1614 0%, #8fa9a0 100%); }
.bg4 .carte-bg { background: linear-gradient(160deg, #0d1018 0%, #7a8fb0 100%); }
.bg5 .carte-bg { background: linear-gradient(160deg, #141408 0%, #a09b7a 100%); }
.bg6 .carte-bg { background: linear-gradient(160deg, #0d1408 0%, #8fa07a 100%); }

/* bg3 : pas de fond coloré, le PNG transparent s'affiche sur fond noir */
.bg3 img {
    object-fit: contain;
    object-position: center;
}

.carte-projet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: opacity 0.4s;
}

/* iframe YouTube : même comportement que la vidéo */
.carte-projet iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 1;
    border: none;
    /* agrandit légèrement pour cacher les bords noirs de YouTube */
    transform: scale(1.05);
}

.carte-projet video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: center;
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* lien YouTube affiché */
.lien-youtube {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.2s;
}

.lien-youtube:hover {
    opacity: 1;
}

/* zone titre + tag en bas de la carte */
.carte-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 22px 22px;
    /* dégradé sombre pour rendre le texte lisible sur la photo */
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    color: #fff;
    z-index: 2;
    transform: translateY(6px);
    transition: transform 0.35s;
}

.carte-projet:hover .carte-meta {
    transform: translateY(0);
}

.carte-meta .tag {
    font-family: 'WonderfulButterfly', cursive;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
}

.carte-meta h3 {
    font-family: 'Charine', serif;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                   FOOTER                         ║ */
/* ╚══════════════════════════════════════════════════╝ */
footer {
    position: relative;
    padding: 22px 50px;
    text-align: center;
}

footer p {
    font-family: 'WonderfulButterfly', cursive;
    font-size: 1.1rem;
    color: var(--text);
    letter-spacing: 0.05em;
}

/* ligne lumineuse animée au-dessus du footer */
footer::before {
    content: '';
    position: absolute;
    left: -10%;
    top: -3px;
    width: 120%;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(240, 236, 228, 0.55) 0%,
        rgba(107, 107, 107, 0.2) 50%,
        transparent 100%
    );
    filter: blur(2px);
    animation: vague-footer 9s ease-in-out infinite alternate;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║              FOND AURORA BORÉALE                 ║ */
/* ╚══════════════════════════════════════════════════╝ */
#aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background:
        radial-gradient(circle at 20% 30%, rgba(122,143,176,.35), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(196,168,130,.25), transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(143,169,160,.25), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(176,122,122,.18), transparent 45%);

    filter: blur(80px);
    animation: aurora-flow 20s ease-in-out infinite alternate;
}

@keyframes aurora-flow {
    0% {
        transform: translateX(-3%) translateY(-2%) scale(1);
    }

    50% {
        transform: translateX(2%) translateY(3%) scale(1.1);
    }

    100% {
        transform: translateX(-2%) translateY(1%) scale(1.05);
    }
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                SPLASH SCREEN                    ║ */
/* ╚══════════════════════════════════════════════════╝ */
#splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    /* donne de la profondeur pour que la rotation 3D soit visible */
    perspective: 800px;
}

#splash-logo {
    font-family: 'Charine', serif;
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--text);
    animation: logo-tourney 5s ease-in-out forwards;
}

}

/* classe ajoutée par JS pour déclencher la disparition */
#splash.splash-out {
    animation: splash-disparait 0.7s ease-in-out forwards;
}


/* ╔══════════════════════════════════════════════════╗ */
/* ║                  ANIMATIONS                     ║ */
/* ╚══════════════════════════════════════════════════╝ */

@keyframes logo-tourney {
    0%   { transform: rotateY(0deg);   opacity: 1; }
    100% { transform: rotateY(360deg); opacity: 1; }
}

@keyframes splash-disparait {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes aurora-drift {
    0% {
        background:
            radial-gradient(ellipse 90% 60% at 15% 75%, rgba(60, 0, 90, 0.35) 0%, transparent 65%),
            radial-gradient(ellipse 70% 50% at 80% 25%, rgba(130, 0, 55, 0.2) 0%, transparent 65%),
            radial-gradient(ellipse 55% 40% at 50% 60%, rgba(25, 0, 65, 0.2) 0%, transparent 65%);
    }
    33% {
        background:
            radial-gradient(ellipse 80% 55% at 30% 70%, rgba(70, 0, 110, 0.3) 0%, transparent 65%),
            radial-gradient(ellipse 65% 45% at 70% 30%, rgba(110, 0, 70, 0.22) 0%, transparent 65%),
            radial-gradient(ellipse 60% 45% at 60% 50%, rgba(40, 0, 80, 0.18) 0%, transparent 65%);
    }
    66% {
        background:
            radial-gradient(ellipse 85% 65% at 20% 80%, rgba(50, 0, 100, 0.32) 0%, transparent 65%),
            radial-gradient(ellipse 60% 50% at 75% 20%, rgba(140, 0, 50, 0.18) 0%, transparent 65%),
            radial-gradient(ellipse 65% 35% at 45% 65%, rgba(30, 0, 75, 0.22) 0%, transparent 65%);
    }
    100% {
        background:
            radial-gradient(ellipse 95% 55% at 25% 75%, rgba(65, 0, 95, 0.3) 0%, transparent 65%),
            radial-gradient(ellipse 70% 55% at 80% 30%, rgba(120, 0, 65, 0.2) 0%, transparent 65%),
            radial-gradient(ellipse 50% 42% at 55% 55%, rgba(35, 0, 70, 0.2) 0%, transparent 65%);
    }
}

@keyframes vague-header {
    0%   { transform: scaleX(0.6)  scaleY(1)   translateX(-8%)  skewX(0deg);  opacity: 0.3;  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; }
    20%  { transform: scaleX(0.85) scaleY(2.5) translateX(4%)   skewX(-3deg); opacity: 0.7;  border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%; }
    40%  { transform: scaleX(0.7)  scaleY(1.2) translateX(-4%)  skewX(2deg);  opacity: 0.4;  border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; }
    60%  { transform: scaleX(0.9)  scaleY(3)   translateX(6%)   skewX(-2deg); opacity: 0.8;  border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; }
    80%  { transform: scaleX(0.65) scaleY(1.5) translateX(-6%)  skewX(3deg);  opacity: 0.35; border-radius: 60% 40% 50% 50% / 40% 60% 50% 50%; }
    100% { transform: scaleX(0.8)  scaleY(2)   translateX(2%)   skewX(-1deg); opacity: 0.6;  border-radius: 50% 50% 45% 55% / 60% 40% 55% 45%; }
}

@keyframes vague-footer {
    0%   { transform: scaleX(0.75) scaleY(2)   translateX(5%)  skewX(2deg);  opacity: 0.5;  border-radius: 45% 55% 60% 40% / 55% 45% 40% 60%; }
    25%  { transform: scaleX(0.55) scaleY(1)   translateX(-7%) skewX(-3deg); opacity: 0.25; border-radius: 60% 40% 45% 55% / 40% 60% 55% 45%; }
    50%  { transform: scaleX(0.88) scaleY(2.8) translateX(3%)  skewX(1deg);  opacity: 0.7;  border-radius: 50% 50% 55% 45% / 60% 40% 45% 55%; }
    75%  { transform: scaleX(0.6)  scaleY(1.3) translateX(-4%) skewX(-2deg); opacity: 0.3;  border-radius: 40% 60% 50% 50% / 50% 50% 60% 40%; }
    100% { transform: scaleX(0.8)  scaleY(2.2) translateX(6%)  skewX(2deg);  opacity: 0.6;  border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%; }
}
