/* =====================================================================
   Etalio — plateforme et back-office commerçant.
   Jetons sur :root, redéfinis en sombre (préférence système, ou data-theme).
   La vitrine d'une boutique a sa propre feuille (vitrine.css), qui partage
   les jetons de base et la typographie.
   ===================================================================== */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
    --fond: #FBF8F3;
    --fond-2: #F3EEE5;
    --carte: #FFFFFF;
    --encre: #1B2B2B;
    --texte: #2E3B3B;
    --doux: #66706F;
    --ligne: #E4DDD1;
    --accent: #1E5F5B;
    --accent-f: #164744;
    --accent-c: #E3EFEC;
    --sur-accent: #FFFFFF;
    --chaud: #D9693B;
    --chaud-c: #FBE9DF;
    --ok: #2F7D4F;
    --ok-c: #E4F2E8;
    --alerte: #B4541A;
    --alerte-c: #FBEBDD;
    --erreur: #B42318;
    --erreur-c: #FCE8E6;
    --rayon: 12px;
    --ombre: 0 1px 2px rgba(27,43,43,.06), 0 4px 16px rgba(27,43,43,.05);
    /* Le logo (charte du 13/10/2026) : le « E » et « talio » en vert profond, le carré en orange. Variables propres, car en thème
       sombre le vert profond ne se lit plus : le E et le mot passent en crème, le carré reste orange. */
    --logo-e: #164744; --logo-t: #164744; --logo-o: #D9693B;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --fond: #121817; --fond-2: #19211F; --carte: #1D2624; --encre: #F1EDE6; --texte: #D8D3CA;
        --doux: #9AA3A0; --ligne: #2E3A37; --accent: #5FB3A9; --accent-f: #7CC7BD; --accent-c: #1E3431; --sur-accent: #0E1514;
        --chaud: #F08A5D; --chaud-c: #3A2419; --ok: #6CC08E; --ok-c: #1C3226; --alerte: #F0A064;
        --alerte-c: #3A2A1B; --erreur: #F1877D; --erreur-c: #3B1E1B; --ombre: none; color-scheme: dark;
        --logo-e: #FBF8F3; --logo-t: #FBF8F3;
    }
}
:root[data-theme="dark"] {
    --fond: #121817; --fond-2: #19211F; --carte: #1D2624; --encre: #F1EDE6; --texte: #D8D3CA;
    --doux: #9AA3A0; --ligne: #2E3A37; --accent: #5FB3A9; --accent-f: #7CC7BD; --accent-c: #1E3431; --sur-accent: #0E1514;
    --chaud: #F08A5D; --chaud-c: #3A2419; --ok: #6CC08E; --ok-c: #1C3226; --alerte: #F0A064;
    --alerte-c: #3A2A1B; --erreur: #F1877D; --erreur-c: #3B1E1B; --ombre: none; color-scheme: dark;
    --logo-e: #FBF8F3; --logo-t: #FBF8F3;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fond); -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--texte); background: var(--fond);
}
h1, h2, h3 { font-family: "Inter Tight", "Inter", system-ui, sans-serif; color: var(--encre); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: .3rem 0 .6rem; }
h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
a { color: var(--accent); }
img { max-width: 100%; }
p { margin: 0 0 .8rem; }
.doux { color: var(--doux); }
.petit { font-size: .88rem; }

/* ── En-tête et pied de la plateforme ───────────────────────────────── */
.entete { background: var(--carte); border-bottom: 1px solid var(--ligne); }
.entete-dedans { max-width: 1120px; margin: 0 auto; padding: .75rem 16px; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.marque { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.marque svg { height: 30px; width: auto; display: block; }
.entete nav { margin-left: auto; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.entete nav a:not(.btn) { color: var(--texte); text-decoration: none; padding: .4rem .6rem; border-radius: 8px; }
.entete nav a:not(.btn):hover { background: var(--fond-2); }
.langues { display: inline-flex; gap: 2px; }
.langues a { font-size: .8rem; font-weight: 600; color: var(--doux); text-decoration: none; padding: .3rem .45rem; border-radius: 6px; }
.langues a.active { color: var(--encre); background: var(--fond-2); }
.pied { margin-top: auto; border-top: 1px solid var(--ligne); color: var(--doux); font-size: .85rem; }
.pied-dedans { max-width: 1120px; margin: 0 auto; padding: 1.2rem 16px; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }

main.page { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
main.etroite { max-width: 520px; }

/* ── Boutons, formulaires ───────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    font: 600 .95rem "Inter", sans-serif; padding: .6rem 1.05rem; border-radius: 10px;
    border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2;
    background: var(--accent); color: var(--sur-accent);
}
.btn:hover { background: var(--accent-f); }
.btn.secondaire { background: var(--carte); color: var(--encre); border-color: var(--ligne); }
.btn.secondaire:hover { background: var(--fond-2); }
.btn.chaud { background: var(--chaud); }
.btn.danger { background: var(--carte); color: var(--erreur); border-color: var(--ligne); }
.btn.petit { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ⚠️ Un fieldset a par défaut « min-inline-size: min-content » : un tableau large à l'intérieur
   l'élargit au-delà de sa colonne et fait défiler toute la page (constaté sur la fiche article). */
fieldset { min-inline-size: 0; }
label { display: block; font-weight: 600; font-size: .9rem; color: var(--encre); margin: .9rem 0 .3rem; }
label.case { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search], select, textarea {
    width: 100%; font: inherit; color: var(--texte); background: var(--carte);
    border: 1px solid var(--ligne); border-radius: 9px; padding: .55rem .7rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { min-height: 7rem; resize: vertical; }
input[type=color] { width: 3.2rem; height: 2.4rem; border: 1px solid var(--ligne); border-radius: 8px; background: var(--carte); padding: 2px; }
.aide { font-size: .84rem; color: var(--doux); margin-top: .25rem; }
.champ-suffixe { display: flex; align-items: stretch; }
.champ-suffixe input { border-radius: 9px 0 0 9px; }
.champ-suffixe span { display: flex; align-items: center; padding: 0 .7rem; background: var(--fond-2); border: 1px solid var(--ligne); border-left: 0; border-radius: 0 9px 9px 0; color: var(--doux); white-space: nowrap; font-size: .9rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .grille-2 { grid-template-columns: 1fr; } }

.message { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 1rem; border: 1px solid transparent; }
.message.ok { background: var(--ok-c); color: var(--ok); }
.message.erreur { background: var(--erreur-c); color: var(--erreur); }
.message.info { background: var(--accent-c); color: var(--accent-f); }

.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.1rem 1.2rem; box-shadow: var(--ombre); margin: 0 0 1rem; }
.carte > h2:first-child { margin-top: 0; }

/* ── Accueil de la plateforme ───────────────────────────────────────── */
.heros { padding: 2.5rem 0 1.5rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.heros h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); margin-bottom: 1rem; }
.heros .accroche { font-size: 1.15rem; color: var(--doux); max-width: 36rem; }
.heros .taux { display: inline-block; background: var(--chaud-c); color: var(--chaud); font-weight: 700; padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem; font-size: .9rem; }
.collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .6rem; aspect-ratio: 1 / 1; max-width: 520px; width: 100%; justify-self: end; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; display: block; background: var(--fond-2); box-shadow: var(--ombre); }
.collage .c-grand { grid-row: 1 / 3; }
.collage .c-haut { grid-column: 2; grid-row: 1; }
.collage .c-bas { grid-column: 2; grid-row: 2; }
@media (max-width: 800px) { .heros { grid-template-columns: 1fr; padding-top: 1rem; } .collage { justify-self: center; max-width: 440px; } }

.section-titre { text-align: center; max-width: 40rem; margin: 2.5rem auto 1.4rem; }
.section-titre h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 .5rem; }
.mosaique { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.mosaique figure { margin: 0; position: relative; overflow: hidden; border-radius: 16px; background: var(--fond-2); box-shadow: var(--ombre); }
.mosaique img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .6s ease; }
.mosaique figcaption {
    position: absolute; inset: auto 0 0 0; padding: 2.4rem 1rem .8rem; color: #fff; font: 650 1.05rem "Inter Tight", "Inter", sans-serif;
    background: linear-gradient(to top, rgba(8, 12, 11, .78), rgba(8, 12, 11, 0));
}
.mosaique figure:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .mosaique img { transition: none; } .mosaique figure:hover img { transform: none; } }
@media (max-width: 900px) { .mosaique { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .mosaique { gap: .5rem; } .mosaique figcaption { font-size: .92rem; padding: 1.8rem .7rem .6rem; } }

.appel { text-align: center; margin: 2.5rem 0 1rem; padding: 2.2rem 1.2rem; border-radius: 20px; background: var(--accent-c); border: 1px solid var(--ligne); }
.appel h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 0 0 .5rem; }
.appel p { color: var(--doux); max-width: 34rem; margin: 0 auto 1.1rem; }
.arguments { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.arguments .carte h3 { color: var(--accent); }

/* ── Back-office ────────────────────────────────────────────────────── */
.admin { flex: 1; display: grid; grid-template-columns: 230px 1fr; width: 100%; max-width: 1280px; margin: 0 auto; }
.admin-menu { border-right: 1px solid var(--ligne); padding: 1.2rem .8rem; display: flex; flex-direction: column; gap: 2px; }
.admin-menu a { color: var(--texte); text-decoration: none; padding: .55rem .75rem; border-radius: 9px; font-weight: 500; }
.admin-menu a:hover { background: var(--fond-2); }
.admin-menu a.actif { background: var(--accent-c); color: var(--accent-f); font-weight: 650; }
.admin-menu .sep { height: 1px; background: var(--ligne); margin: .6rem .4rem; }
.admin-contenu { padding: 1.4rem 1.6rem 3rem; min-width: 0; }
.admin-titre { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-titre h1 { margin: 0; }
.admin-titre .actions { margin: 0 0 0 auto; }
@media (max-width: 820px) {
    .admin { grid-template-columns: 1fr; }
    .admin-menu { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ligne); padding: .5rem 16px; }
    .admin-menu a { white-space: nowrap; }
    .admin-menu .sep { display: none; }
    .admin-contenu { padding: 1.2rem 16px 3rem; }
}
.statut { display: inline-block; font-size: .78rem; font-weight: 650; padding: .15rem .55rem; border-radius: 999px; background: var(--fond-2); color: var(--doux); white-space: nowrap; }
.statut.publie, .statut.ouverte { background: var(--ok-c); color: var(--ok); }
.statut.brouillon, .statut.en_preparation { background: var(--alerte-c); color: var(--alerte); }
.statut.archive, .statut.suspendue, .statut.fermee { background: var(--erreur-c); color: var(--erreur); }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.chiffres .carte { margin: 0; }
.chiffres .valeur { font: 700 1.8rem "Inter Tight", sans-serif; color: var(--encre); }

.a-faire { list-style: none; padding: 0; margin: 0; }
.a-faire li { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--ligne); }
.a-faire li:first-child { border-top: 0; }
.a-faire .puce { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--ligne); display: grid; place-items: center; font-size: .8rem; margin-top: .1rem; }
.a-faire li.fait .puce { background: var(--ok); border-color: var(--ok); color: var(--carte); }
.a-faire li.fait .titre { color: var(--doux); text-decoration: line-through; }
.a-faire .titre { font-weight: 600; color: var(--encre); }
.a-faire .plus { margin-left: auto; flex: none; }

/* Tableaux : défilent dans leur boîte, jamais la page. */
.tableau-boite { overflow-x: auto; border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--carte); }
table.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); font-weight: 650; padding: .6rem .75rem; border-bottom: 1px solid var(--ligne); background: var(--fond-2); }
.tableau td { padding: .55rem .75rem; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td.num, .tableau th.num { text-align: right; white-space: nowrap; }
.tableau input[type=text], .tableau input[type=number] { padding: .35rem .5rem; min-width: 5.5rem; }
.vignette { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--fond-2); display: block; }
.vignette.vide { display: grid; place-items: center; color: var(--doux); font-size: .7rem; }

.filtres { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filtres input[type=search] { max-width: 280px; }
.filtres select { width: auto; }

.onglets-langue { display: flex; gap: .3rem; margin: .8rem 0 0; flex-wrap: wrap; }
.bloc-langue { border: 1px solid var(--ligne); border-radius: 10px; padding: .2rem .9rem .9rem; margin-top: .6rem; }
.bloc-langue legend { font-weight: 700; font-size: .85rem; color: var(--accent); padding: 0 .3rem; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .8rem; }
.photos figure { margin: 0; border: 1px solid var(--ligne); border-radius: 10px; overflow: hidden; background: var(--carte); }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photos figcaption { display: flex; gap: .3rem; padding: .4rem; flex-wrap: wrap; }
.photos .principale { outline: 3px solid var(--accent); outline-offset: -3px; }
