/* =========================================================
   Tchestia Fiesse — thème pleine page
   Direction : « nuit de festival » — hero sombre dramatique,
   contenu clair et aéré, duo magenta + cyan, or solaire.
   ========================================================= */

:root {
    /* Palette */
    --night:    #160d2e;   /* indigo nuit (ciel) */
    --night-2:  #241245;   /* indigo plus clair */
    --magenta:  #ff2e8b;   /* rose vif (ciel coucher) */
    --cyan:      #1fd3e0;  /* cyan glacé (logo) */
    --sun:       #ffc24b;  /* or solaire */
    --grass:     #8bd450;  /* vert prairie */
    --paper:     #f7f8ff;  /* blanc cassé frais */
    --ink:       #1b1530;  /* texte sur fond clair */
    --muted:     #6c6786;

    /* Dégradés signature */
    --grad-brand: linear-gradient(100deg, var(--magenta), var(--sun));
    --grad-cool:  linear-gradient(100deg, var(--cyan), var(--magenta));

    /* Système */
    --maxw: 1120px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 40px -18px rgba(22, 13, 46, .45);
    --font-display: "Unbounded", "Trebuchet MS", sans-serif;
    --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--magenta); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Image de fond du festival sur TOUTES les pages, étirée pour remplir tout l'écran (non tronquée) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    /* 100% 100% : l'image est étirée aux dimensions du viewport — aucun rognage */
    background: var(--night) url('/media/img/background.jpg') center center / 100% 100% no-repeat;
}
/* Voile léger pour adoucir l'image sans la masquer */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(22,13,46,.30), rgba(22,13,46,.45));
}
/* Pages de contenu : panneau translucide « givré » — l'image reste visible autour et au travers */
body:not(.tpl-hero) .container {
    background: rgba(18, 11, 38, .55);
    color: #efeaff;
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: clamp(1.25rem, 4vw, 2.5rem);
    margin-bottom: clamp(2rem, 6vw, 4rem);
}
/* Texte clair sur les cartes sombres */
body:not(.tpl-hero) .container a { color: var(--cyan); }
body:not(.tpl-hero) .container a:hover { color: #fff; }
body:not(.tpl-hero) .container .embed-fallback { color: #c4bce4; }
/* les boutons gardent leur couleur propre malgré la règle ci-dessus */
body:not(.tpl-hero) .container a.btn { color: #fff; }
body:not(.tpl-hero) .container a.btn-ghost { color: var(--cyan); }
body:not(.tpl-hero) .container a.btn-ghost:hover { color: var(--night); }

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -.02em; }
h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 800;
    margin: 0 0 1.5rem;
    position: relative;
}
h1::after {
    content: "";
    display: block;
    width: 84px; height: 6px;
    margin-top: .7rem;
    border-radius: 99px;
    background: var(--grad-brand);
}
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; }
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 2.4rem; }
.prose a:hover { color: var(--ink); }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) 1.25rem 4.5rem;
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-block;
    background: var(--grad-brand);
    color: #fff;
    padding: .85rem 1.7rem;
    border-radius: 99px;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    box-shadow: 0 10px 24px -10px rgba(255,46,139,.7);
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(255,46,139,.8); }
.btn-ghost {
    background: transparent;
    box-shadow: none;
    border: 2px solid var(--cyan);
    color: var(--cyan);
}
.btn-ghost:hover { background: var(--cyan); color: var(--night); box-shadow: none; }
.cal-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }

/* ---------- Navigation (pages internes) ---------- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .7rem 1.4rem;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}
.nav-brand { display: inline-flex; }
.nav-logo { height: 60px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.45)); }
.nav-links { display: flex; gap: .2rem 1.4rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .98rem;
    padding: .3rem 0;
    position: relative;
    text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.nav-links a::after {
    content: "";
    position: absolute; left: 0; right: 100%; bottom: -3px;
    height: 3px; border-radius: 99px;
    background: var(--grad-brand);
    transition: right .22s ease;
}
.nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }
.nav-toggle { display: none; }
.nav-burger { display: none; color: #fff; font-size: 1.7rem; cursor: pointer; margin-left: auto; line-height: 1; }

/* ---------- Accueil — héro pleine page ---------- */
.hero {
    /* Pas de fond propre : l'image vient de body::before (étirée, identique à toutes les pages) */
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 3rem 1.25rem;
}
.hero-inner { max-width: 820px; animation: heroRise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-logo {
    width: min(620px, 92vw);
    margin: 0 auto 1.4rem;
    filter: drop-shadow(0 14px 30px rgba(0,0,0,.45));
    animation: floaty 6s ease-in-out infinite;
}
.hero-baseline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.8rem, 6vw, 3.4rem);
    letter-spacing: -.02em;
    margin: 0 0 2.2rem;
    background: linear-gradient(100deg, #fff, var(--cyan) 55%, var(--sun));
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    text-shadow: 0 2px 30px rgba(31,211,224,.25);
}
.hero-text { margin-bottom: 2rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.hero-menu { display: flex; flex-wrap: wrap; gap: .7rem .8rem; justify-content: center; }
.hero-menu a {
    --i: 0;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .92rem;
    letter-spacing: .01em;
    padding: .6rem 1.25rem;
    border: 2px solid rgba(255,255,255,.55);
    border-radius: 99px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(4px);
    transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
    animation: pillIn .5s ease both;
    animation-delay: calc(.5s + var(--i) * .07s);
}
.hero-menu a:nth-child(1){--i:1} .hero-menu a:nth-child(2){--i:2}
.hero-menu a:nth-child(3){--i:3} .hero-menu a:nth-child(4){--i:4}
.hero-menu a:nth-child(5){--i:5} .hero-menu a:nth-child(6){--i:6}
.hero-menu a:hover {
    transform: translateY(-3px);
    background: #fff; color: var(--night); border-color: #fff;
}

@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pillIn   { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes floaty   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Programmation ---------- */
.lineup-affiche {
    width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0 3rem;
    box-shadow: var(--shadow);
}
.prog-day { margin-bottom: 3.5rem; }
.prog-day h2 {
    display: inline-block;
    padding: .15rem .9rem;
    border-radius: 99px;
    color: #fff;
    background: var(--grad-brand);
    margin-bottom: 1.4rem;
}
.artist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}
.artist {
    position: relative;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--night-2);
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform .25s ease, box-shadow .25s ease;
}
.artist img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.artist-name {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.6rem .9rem .8rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(22,13,46,.92));
    transform: translateY(18%);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.artist:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -20px rgba(22,13,46,.6); }
.artist:hover img { transform: scale(1.07); }
.artist:hover .artist-name { opacity: 1; transform: none; }
/* Photo cliquable vers le réseau de l'artiste */
.artist a { display: block; color: inherit; text-decoration: none; }
.artist.has-link { cursor: pointer; }
.artist-ig { font-size: .82em; opacity: .85; }

/* ---------- Carte / Infos pratiques ---------- */
.map {
    height: 440px;
    width: 100%;
    border-radius: var(--radius);
    margin: 1.6rem 0;
    background: #e7e3f5;
    box-shadow: var(--shadow);
    border: 1px solid rgba(22,13,46,.08);
}
.leaflet-container { font-family: var(--font-body); }

/* ---------- Billetterie / Galerie ---------- */
.weez-wrap, .gallery-embed { margin-top: 1.6rem; }
/* Cadre du widget billetterie Weezevent (iframe injectée par widget.min.js) */
.weez-wrap {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius);
    overflow: hidden;                 /* arrondit les coins de l'iframe injectée */
    background: #fff;                 /* comble proprement (le module weez est clair) */
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.5);
}
.weez-wrap iframe {
    display: block;
    width: 100% !important;
    border: 0;
}
/* le lien de repli (avant chargement / si bloqué) prend l'allure d'un bouton de la charte */
.weez-wrap > a.weezevent-widget-integration {
    display: inline-block;
    margin: 1.25rem;
    padding: .85rem 1.7rem;
    background: var(--grad-brand);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    border-radius: 99px;
    box-shadow: 0 10px 24px -10px rgba(255,46,139,.7);
}
.gallery-embed iframe {
    width: 100%;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--night-2);
    color-scheme: dark; /* incite l'embed ente à s'afficher en mode sombre s'il le supporte */
    /* Fondu des bords : les 4 côtés s'estompent vers la carte sombre */
    --fade: 34px;
    -webkit-mask-image:
        linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
    mask-composite: intersect;
}
.embed-fallback { color: var(--muted); font-size: .95rem; margin-top: .9rem; }
.tp-notice {
    background: #fff5d6;
    border: 1px solid var(--sun);
    padding: .8rem 1.1rem;
    border-radius: var(--radius-sm);
    color: #5b4a16;
}

/* ---------- Footer / erreur ---------- */
.site-footer {
    background: transparent;
    color: #fff;
    text-align: center;
    padding: 2.2rem 1rem;
    text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.site-footer a { color: var(--cyan); }
.site-social { display: flex; justify-content: center; gap: 1.1rem; margin-bottom: .9rem; }
.site-social a {
    color: #fff;
    display: inline-flex;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,.5));
    transition: color .18s ease, transform .18s ease;
}
.site-social a:hover { color: var(--cyan); transform: translateY(-2px); }
.error-page { text-align: center; padding-top: 4rem; }
.error-page h1 { font-size: clamp(4rem, 18vw, 9rem); }
.error-page h1::after { margin: .8rem auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .artist-grid { grid-template-columns: repeat(2, 1fr); }
    .artist-name { opacity: 1; transform: none; font-size: .85rem; } /* mobile : noms visibles */
    .nav-burger { display: block; }
    .nav-links {
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: .1rem;
        margin-left: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .nav-links a { padding: .55rem 0; width: 100%; }
    .nav-toggle:checked ~ .nav-links { max-height: 520px; padding-top: .6rem; }
}
@media (max-width: 460px) {
    .artist-grid { grid-template-columns: 1fr; }
}

/* ---------- Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
