/* La page d'accueil. Les couleurs et les polices viennent de l'aura (_kalasha/aura.css) :
   --kalasha-fond, --kalasha-texte, --kalasha-accent, --kalasha-sur-accent, --kalasha-doux,
   --kalasha-police-titres, --kalasha-police-texte. Les mesures ci-dessous, chaque identité les
   règle à sa façon (plus bas), et la disposition range la page (tout en bas). */

:root {
    --largeur: 68rem;
    --marge: clamp(1rem, 5vw, 3rem);
    --espace: clamp(3.5rem, 9vw, 6.5rem);
    --arrondi: 16px;
    --arrondi-bouton: 999px;
    --titre-poids: 700;
    --titre-casse: none;
    --titre-espacement: normal;
    --ombre: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--kalasha-fond);
    color: var(--kalasha-texte);
    font: 1.08rem/1.65 var(--kalasha-police-texte);
}

h1, h2 {
    font-family: var(--kalasha-police-titres);
    font-weight: var(--titre-poids);
    text-transform: var(--titre-casse);
    letter-spacing: var(--titre-espacement);
    line-height: 1.08;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 8vw, 5.5rem); margin-bottom: 0.2em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--kalasha-accent); }
p { margin: 0 0 1em; max-width: 64ch; }
img { display: block; max-width: 100%; }
a { color: var(--kalasha-accent); }
a:focus-visible { outline: 3px solid var(--kalasha-accent); outline-offset: 3px; }

/* La barre du haut : reprise par les pages des briques. */
.tete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    padding: 1rem var(--marge);
}

.marque {
    font-family: var(--kalasha-police-titres);
    font-weight: var(--titre-poids);
    font-size: 1.25rem;
    color: var(--kalasha-texte);
    text-decoration: none;
}

.tete nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.tete nav a { color: inherit; text-decoration: none; font-size: 0.95rem; }
.tete nav a:hover { color: var(--kalasha-accent); }

/* La couverture : le nom, l'accroche, l'emblème, la grande image. */
.couverture { position: relative; }
.couverture-media img, .couverture-media .emplacement { width: 100%; height: 100%; object-fit: cover; }
.accroche { font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.35; max-width: 34ch; }
.intro { max-width: 52ch; opacity: 0.9; }
.embleme { width: clamp(5rem, 14vw, 8.5rem); aspect-ratio: 1; margin-bottom: 1.2rem; color: var(--kalasha-accent); }
.embleme svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Les parties, l'une sous l'autre. */
.bloc { width: min(100%, var(--largeur)); margin: 0 auto; padding: var(--espace) var(--marge) 0; }
.partie + .partie { margin-top: var(--espace); }
.partie-image { margin-top: 1.5rem; }

.valeurs {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.valeurs li {
    display: grid;
    gap: 0.4rem;
    padding: 1.3rem 1.4rem;
    border-radius: var(--arrondi);
    background: var(--kalasha-doux);
    box-shadow: var(--ombre);
}

.valeurs strong { font-family: var(--kalasha-police-titres); font-weight: var(--titre-poids); font-size: 1.2rem; }
.valeurs span { font-size: 0.95rem; }

.citation { padding: var(--espace) var(--marge) 0; }

.citation blockquote {
    margin: 0 auto;
    max-width: 46rem;
    text-align: center;
    font-family: var(--kalasha-police-titres);
    font-size: clamp(1.5rem, 3.6vw, 2.4rem);
    line-height: 1.25;
    color: var(--kalasha-accent);
}

.citation p { max-width: none; margin: 0; }

.galerie { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
figure { margin: 0; }

figure img, figure .emplacement {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--arrondi);
    box-shadow: var(--ombre);
}

figcaption { margin-top: 0.5rem; font-size: 0.92rem; opacity: 0.8; }
.video, .emplacement-video { aspect-ratio: 16 / 9; border-radius: var(--arrondi); overflow: hidden; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* L'appel : les boutons des briques branchées. */
.appel { text-align: center; }
.appel p { margin-inline: auto; }
.appel-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }

.bouton {
    display: inline-block;
    padding: 0.85rem 1.7rem;
    border-radius: var(--arrondi-bouton);
    background: var(--kalasha-accent);
    color: var(--kalasha-sur-accent);
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--ombre);
}

.pied {
    margin-top: var(--espace);
    padding: 2.5rem var(--marge);
    text-align: center;
    background: var(--kalasha-doux);
}

.pied p { margin: 0 auto 0.3rem; }
.pied-nom { font-family: var(--kalasha-police-titres); font-weight: var(--titre-poids); font-size: 1.3rem; }

/* Un emplacement prêt pour une photo ou une vidéo : remplacé dès qu'on en dépose une. */
.emplacement {
    display: grid;
    place-items: center;
    min-height: 10rem;
    background:
        radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--kalasha-accent) 35%, transparent), transparent 60%),
        linear-gradient(135deg, var(--kalasha-doux), color-mix(in srgb, var(--kalasha-accent) 25%, var(--kalasha-doux)));
    color: var(--kalasha-texte);
}

.emplacement span {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--kalasha-fond) 80%, transparent);
    font-size: 0.9rem;
}

/* L'ouverture, une seule fois : le nom et l'accroche arrivent, l'emblème se dessine. */
@media (prefers-reduced-motion: no-preference) {
    .couverture-texte > * { animation: ouverture 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .couverture-texte > :nth-child(2) { animation-delay: 0.15s; }
    .couverture-texte > :nth-child(3) { animation-delay: 0.3s; }
    .couverture-texte > :nth-child(4) { animation-delay: 0.45s; }
    .embleme .trace { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 1.8s 0.2s ease-in-out forwards; }
    .embleme .apparait { animation: ouverture 0.8s 1.2s both; }
    @keyframes ouverture { from { opacity: 0; translate: 0 1.2rem; } }
    @keyframes trace { to { stroke-dashoffset: 0; } }
}

/* ---------- L'identité : Sérieuse ---------- */
.identite-serieuse { --arrondi: 4px; --arrondi-bouton: 4px; --titre-poids: 600; --ombre: none; }
.identite-serieuse .bloc { border-top: 1px solid color-mix(in srgb, var(--kalasha-texte) 15%, transparent); }
.identite-serieuse .valeurs li { border-left: 3px solid var(--kalasha-accent); }

/* ---------- La disposition : Grande couverture ---------- */
.disposition-couverture .couverture { min-height: min(82vh, 48rem); display: grid; align-items: end; color: #fff; }
.disposition-couverture .couverture-media { position: absolute; inset: 0; }
.disposition-couverture .couverture-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.7), rgb(0 0 0 / 0.05) 62%); }
.disposition-couverture .couverture-media .emplacement span { display: none; }
.disposition-couverture .couverture-texte { position: relative; z-index: 1; width: min(100%, var(--largeur)); margin: 0 auto; padding: var(--espace) var(--marge) clamp(2rem, 6vw, 4rem); }
.disposition-couverture .couverture h1 { color: #fff; }
.disposition-couverture .embleme { color: #fff; }
.disposition-couverture .partie:first-child { display: grid; gap: 0 clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: 1fr 1fr; grid-template-areas: "titre image" "texte image"; align-items: start; }
.disposition-couverture .partie:first-child h2 { grid-area: titre; }
.disposition-couverture .partie:first-child .partie-texte { grid-area: texte; }
.disposition-couverture .partie:first-child .partie-image { grid-area: image; margin-top: 0; }
@media (max-width: 760px) {
    .disposition-couverture .partie:first-child { grid-template-columns: 1fr; grid-template-areas: "titre" "texte" "image"; }
}
