/* Styles du site public. Les couleurs, la police et l'arrondi sont des
   variables (--bg, --text, --accent, --radius...) réglées dans l'admin :
   Apparence > Couleurs du site. */

/* --- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

.container { --gutter: 20px; max-width: 920px; margin: 0 auto; padding: 0 var(--gutter); }

a { color: var(--accent-soft); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* --- Barre du haut ------------------------------------------------------------ */

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 12px; }

.barre-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-top: 18px; }
.menu-site { order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; }
.menu-site a { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--text); text-decoration: none; transition: background 0.15s; }
.menu-site a:hover, .menu-site a.active { background: var(--surface); }
.logo { display: block; width: 90px; height: auto; }
.langues { display: flex; gap: 4px; flex-shrink: 0; }
.langues a { padding: 6px 10px; border-radius: 8px; font-size: 0.85rem; color: var(--text-dim); text-decoration: none; }
.langues a:hover { color: var(--text); }
.langues a.active { background: var(--surface); color: var(--text); }

/* --- Boutons ------------------------------------------------------------------- */

.btn {
    --btn-bg: var(--accent);
    --btn-profondeur: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease;
}
.btn-principal, .btn-cta {
    background: var(--btn-bg);
    box-shadow: 0 var(--btn-profondeur) 0 color-mix(in srgb, var(--btn-bg), #000 35%);
}
.btn-principal:hover, .btn-cta:hover { background: color-mix(in srgb, var(--btn-bg), #fff 15%); }
.btn-principal:active, .btn-cta:active { transform: translateY(var(--btn-profondeur)); box-shadow: none; }
.btn-principal { color: var(--on-accent); }
.btn-secondaire { color: inherit; border: 2px solid color-mix(in srgb, currentColor, transparent 55%); }
.btn-secondaire:hover { border-color: currentColor; }
.btn-cta {
    --btn-bg: var(--cta);
    --btn-profondeur: 6px;
    max-width: 440px;
    min-height: 64px;
    margin: 26px auto 0;
    padding: 16px 30px;
    color: var(--on-cta);
    font-size: 1.1rem;
}

.rangee-boutons { display: flex; flex-direction: column; gap: 14px; margin-top: 36px; }

/* --- Sections et vagues ------------------------------------------------------------ */

.section { padding: 36px 0; }
.section.avec-fond { background: var(--section-fond); color: var(--section-texte); padding: 24px 0 34px; }
.section.vague-haut { padding-top: 8px; }
.section.vague-bas { padding-bottom: 18px; }

.vague { display: block; width: 100%; height: 34px; margin: -1px 0; fill: var(--vague); background: var(--vague-derriere); }

.section-entete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-titre { margin: 0; font-size: 1.3rem; line-height: 1.3; font-weight: 600; }
.section-titre.centre { text-align: center; }
.section-sous-titre { margin: 6px 0 0; text-align: center; font-size: 0.9rem; color: color-mix(in srgb, currentColor 70%, transparent); }
.section-lien { flex-shrink: 0; font-size: 0.9rem; color: inherit; text-decoration: none; }
.section-lien:hover { text-decoration: underline; }
.section .prose { color: inherit; }

/* Présentation du studio */
.presentation { display: grid; gap: 14px; font-size: 0.95rem; color: var(--text-dim); }
.presentation p { margin: 0; }
.presentation strong { color: var(--text); font-weight: 600; }
.presentation p:first-child { font-size: 1.2rem; line-height: 1.5; color: var(--text); }

/* Présentation d'un jeu */
.jeu { text-align: center; }
.jeu-pitch { max-width: 620px; margin: 16px auto 0; }
.jeu-etiquettes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.8rem; }
.jeu-etiquettes li { padding: 3px 12px; border-radius: 999px; border: 2px solid color-mix(in srgb, currentColor, transparent 60%); }
.jeu-description { max-width: 680px; margin: 48px auto 0; font-size: 0.95rem; color: color-mix(in srgb, currentColor 80%, transparent); }
.jeu-description strong { color: currentColor; font-weight: 600; }

.diaporama { position: relative; margin-top: 20px; }
.diapos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); background: color-mix(in srgb, currentColor 12%, transparent); }
.diapos::-webkit-scrollbar { display: none; }
.diapo { flex: 0 0 100%; aspect-ratio: 16 / 9; scroll-snap-align: start; }
.diapo img, .diapo iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.diapo-fleche {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--section-fond, var(--band)), transparent 15%);
    color: var(--section-texte, var(--band-text));
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.diapo-fleche.precedente { left: 10px; }
.diapo-fleche.suivante { right: 10px; }
.diapo-points { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.diapo-points button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.diapo-points button::before { content: ""; display: block; width: 8px; height: 8px; margin: auto; border-radius: 50%; background: color-mix(in srgb, currentColor, transparent 70%); }
.diapo-points button.active::before { background: var(--cta); }
.diapo-note { min-height: 1.6em; margin: 4px 0 0; font-size: 0.9rem; color: color-mix(in srgb, currentColor 70%, transparent); }

.facettes { display: grid; gap: 32px; margin-top: 36px; text-align: left; }
.facette img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: color-mix(in srgb, currentColor 12%, transparent); }
.facette h3 { margin: 14px 0 4px; font-size: 1.1rem; font-weight: 600; }
.facette p { margin: 0; font-size: 0.88rem; color: color-mix(in srgb, currentColor 80%, transparent); }

/* Équipe */
.equipe { display: grid; gap: 36px; margin-top: 20px; }
.membre { max-width: 400px; margin: 0 auto; text-align: center; }
.avatar {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 14px;
    border: 4px solid var(--avatar-1);
    border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%;
    background: var(--surface);
    object-fit: cover;
}
.membre:nth-child(even) .avatar { border-color: var(--avatar-2); border-radius: 44% 56% 47% 53% / 55% 45% 55% 45%; }
.membre h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 600; }
.membre p { margin: 0; font-size: 0.88rem; color: color-mix(in srgb, currentColor 80%, transparent); }
.membre p strong { color: currentColor; font-weight: 600; }

/* Réalisations : bande à faire défiler sur téléphone */
.realisations { display: flex; gap: 12px; margin: 18px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.realisations::-webkit-scrollbar { display: none; }
.realisation { flex: 0 0 84%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface); scroll-snap-align: start; }
.realisation img, .realisation video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Texte libre */
.texte-libre .section-titre { margin-bottom: 16px; }
.texte-libre.centre { text-align: center; }
.texte-libre.centre .prose .boutons { justify-content: center; }

/* --- Newsletter -------------------------------------------------------------------- */

.newsletter-piege { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-titre { margin: 0; font-size: 1.2rem; line-height: 1.3; font-weight: 600; }
.newsletter-texte { margin: 6px 0 0; font-size: 0.92rem; opacity: 0.85; }
.newsletter-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.newsletter input[type=email] { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 10px 18px; border: 2px solid transparent; border-radius: 999px; background: #fff; color: #1e2a5a; font: inherit; }
.newsletter input[type=email]:focus { outline: none; border-color: var(--accent); }
.newsletter button { min-height: 48px; padding: 10px 24px; border: none; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent), #000 35%); }
.newsletter button:active { transform: translateY(4px); box-shadow: none; }
.newsletter button:disabled { opacity: 0.7; cursor: default; }
.newsletter-message { margin: 12px 0 0; font-size: 0.92rem; font-weight: 600; }
.newsletter-message.ok { padding: 12px 16px; border-radius: 12px; background: var(--cta); color: var(--on-cta); }
.newsletter-message.erreur { color: var(--cta); }
.newsletter-bande { max-width: 560px; margin: 40px auto 0; padding: 24px; border: 2px solid color-mix(in srgb, currentColor, transparent 75%); border-radius: var(--radius); text-align: left; }
.newsletter-carte { margin-top: 40px; padding: 22px; border-radius: var(--radius); background: var(--band); color: var(--band-text); }

/* --- Pages en colonne (article, Actualités) ------------------------------------------ */

.page-colonne {
    --page-fond: var(--band);
    --page-motif: color-mix(in srgb, var(--band), #fff 7%);
    --colonne-fond: var(--bg);
    --colonne-largeur: 860px;
    background-color: var(--page-fond);
}
.page-colonne > .container { max-width: var(--colonne-largeur); min-height: 100vh; background: var(--colonne-fond); color: var(--text); box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); }
.page-colonne h1 { margin: 10px 0 0; font-size: 1.8rem; line-height: 1.25; font-weight: 600; color: var(--titres, inherit); font-family: var(--titres-police, inherit); }

.fil { display: inline-block; margin-top: 28px; font-size: 0.9rem; color: var(--text-dim); text-decoration: none; }
.fil:hover { color: var(--text); }
.intro { margin: 8px 0 0; color: var(--text-dim); }
.vide { margin-top: 40px; color: var(--text-dim); font-style: italic; }
.page-colonne .cartes-articles { margin-top: 28px; }

/* Couverture : toute la largeur de la colonne, collée en haut */
.banniere { display: block; width: calc(100% + 2 * var(--gutter)); max-width: none; height: auto; margin: 0 calc(var(--gutter) * -1); }
.banniere.recadree { height: min(var(--hauteur), 60vw); object-fit: cover; }
.article-tete { margin-top: 26px; }
.article-tete .categorie { margin-bottom: 10px; font-size: 0.85rem; }
.filtres-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.filtres-categories a { padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.filtres-categories a:hover { background: var(--surface); }
.filtres-categories a.active { background: var(--text); color: var(--bg); }
.article-tete h1 { margin-top: 0; }
.article-meta { display: block; margin-top: 8px; font-size: 0.88rem; color: var(--text-dim); }
.page-colonne .prose { margin-top: 28px; }
.langues-article { margin: 18px 0 0; font-size: 0.88rem; color: var(--text-dim); }
.langues-article a { margin-left: 6px; color: var(--liens, var(--accent-soft)); }
.langues-article a.active { font-weight: 600; text-decoration: none; color: var(--text); }

.bandeau-admin { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 10px 14px; border-radius: 10px; background: var(--surface); font-size: 0.88rem; }
.bandeau-admin.discret { margin-top: 8px; padding: 0; background: none; justify-content: flex-end; }

.pied-article { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; }
.lien-itch { font-weight: 600; color: var(--liens, var(--accent-soft)); }
.like { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 2px solid color-mix(in srgb, var(--accent), transparent 50%); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: transform 0.15s ease, background-color 0.15s ease; }
.like:hover { border-color: var(--accent); }
.like svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2; }
.like[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.like[aria-pressed="true"] svg { fill: var(--on-accent); stroke: var(--on-accent); }
.like:active { transform: scale(0.94); }

.auteur { display: flex; align-items: center; gap: 16px; margin-top: 36px; padding: 18px; border-radius: var(--radius); background: var(--surface); }
.auteur img { flex-shrink: 0; width: 72px; height: 72px; border: 3px solid var(--avatar-1); border-radius: 50%; object-fit: cover; }
.auteur-nom { display: block; font-size: 1.05rem; font-weight: 600; }
.auteur p { margin: 2px 0 0; font-size: 0.9rem; color: var(--text-dim); }

/* --- Bas de page -------------------------------------------------------------------- */

.pied { margin-top: 20px; padding: 20px 0 28px; border-top: 1px solid color-mix(in srgb, var(--text), transparent 82%); font-size: 0.8rem; color: var(--text-dim); }
.page-colonne .pied { margin-top: 56px; }
.pied p { margin: 0; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px !important; }
.pied a { color: var(--accent-soft); text-decoration: none; }
.pied a:hover { text-decoration: underline; }

/* --- Tablette et ordinateur ------------------------------------------------------------ */

@media (min-width: 760px) {
    .container { --gutter: 32px; }
    .barre-haut { padding-top: 28px; }
    .menu-site { order: 0; flex: 1; flex-basis: auto; }
    .logo { width: 140px; }

    .section { padding: 52px 0; }
    .section.avec-fond { padding: 28px 0 44px; }
    .section.vague-haut { padding-top: 12px; }
    .section.vague-bas { padding-bottom: 24px; }
    .vague { height: 56px; }
    .section-titre { font-size: 1.6rem; }

    .presentation { grid-template-columns: 1fr 1fr; gap: 22px 48px; }
    .presentation p:first-child { grid-column: 1 / -1; padding-bottom: 24px; border-bottom: 1px solid color-mix(in srgb, var(--text), transparent 82%); font-size: 1.5rem; }

    .jeu-pitch { font-size: 1.1rem; }
    .diaporama { margin-top: 28px; }
    .btn-cta { min-height: 72px; margin-top: 34px; font-size: 1.25rem; }
    .jeu-description { margin-top: 64px; font-size: 1rem; }
    .facettes { grid-template-columns: 1fr 1fr; gap: 40px 28px; margin-top: 48px; }
    .facette:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
    .facette:last-child:nth-child(odd) h3 { margin-top: 0; }

    .equipe { grid-template-columns: 1fr 1fr; gap: 56px; }
    .avatar { width: 140px; height: 140px; }
    .rangee-boutons { flex-direction: row; margin-top: 44px; }
    .rangee-boutons .btn { flex: 1; }

    .realisations { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 26px 0 0; padding: 0; overflow: visible; }

    .page-colonne > .container { --gutter: 48px; }
    .page-colonne h1 { font-size: 2.3rem; }
    .article-tete h1 { font-size: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .like { transition: none; }
}

/* Page « Inscription confirmée » */
.confirmation { max-width: 480px; margin: 60px auto; text-align: center; }
.confirmation h1 { margin: 0 0 8px; font-size: 1.8rem; }
.confirmation p { margin: 0; color: var(--text-dim); }
.confirmation .btn { display: inline-flex; margin-top: 28px; }
