/* Gallery Maker : feuille de style de l'administration.
   Un outil de travail : lisible, calme, utilisable au doigt comme à la souris. */

@font-face { font-family: "Literata"; src: url("polices/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("polices/hanken-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --fond: #f4f4f1;
  --carte: #ffffff;
  --texte: #1c1c1e;
  --discret: #62636a;
  --filet: #d9d9d4;
  --action: #23395d;
  --action-fond: #e9eef6;
  --danger: #a12626;
  --ok: #1f6b45;
  --serif: "Literata", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1rem/1.5 var(--sans); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--action); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
h1 { font: 400 1.75rem/1.2 var(--serif); margin: 0 0 1.25rem; text-wrap: balance; }
h2 { font: 600 1.0625rem/1.3 var(--sans); margin: 2.25rem 0 0.75rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.aide { display: block; color: var(--discret); font-size: 0.875rem; font-weight: 400; }
p.aide { margin: 0.25rem 0 1rem; max-width: 70ch; }
.vide { color: var(--discret); background: var(--carte); border: 1px dashed var(--filet); border-radius: 6px; padding: 1.25rem; max-width: 70ch; }

/* Barre du haut et menu */
.barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; padding: 0.7rem clamp(1rem, 3vw, 2rem); background: var(--texte); color: #fff; font-size: 0.9375rem; }
.barre a, .barre .lien { color: #fff; }
.barre-site, .barre-compte { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.1rem; margin: 0; }
.barre-marque { font-family: var(--serif); opacity: 0.75; }
.cadre { display: grid; grid-template-columns: minmax(0, 1fr); }
.menu { background: var(--carte); border-bottom: 1px solid var(--filet); }
.menu ul { list-style: none; margin: 0; padding: 0.4rem clamp(0.5rem, 2vw, 1rem); display: flex; gap: 0.15rem; overflow-x: auto; }
.menu a { display: block; padding: 0.55rem 0.8rem; border-radius: 5px; color: var(--texte); text-decoration: none; white-space: nowrap; }
.menu a:hover { background: var(--fond); }
.menu a[aria-current="page"] { background: var(--action-fond); color: var(--action); font-weight: 600; }
.pastille { display: inline-block; min-width: 1.4rem; padding: 0 0.4rem; border-radius: 1rem; background: var(--danger); color: #fff; font-size: 0.8125rem; text-align: center; font-weight: 600; }
main { padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2.5rem) 4rem; min-width: 0; max-width: 78rem; }
@media (min-width: 62rem) {
  .cadre { grid-template-columns: 15rem minmax(0, 1fr); min-height: calc(100vh - 3rem); }
  .menu { border-bottom: 0; border-right: 1px solid var(--filet); }
  .menu ul { flex-direction: column; padding: 1rem 0.75rem; overflow: visible; }
  .menu a { white-space: normal; }
  .menu-separe { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--filet); }
}

/* Messages */
.alerte { border-left: 4px solid var(--discret); background: var(--carte); padding: 0.75rem 1rem; margin: 0 0 1.25rem; max-width: 70ch; border-radius: 0 5px 5px 0; }
.alerte-ok { border-color: var(--ok); }
.alerte-erreur { border-color: var(--danger); }

/* Boutons */
.bouton, button.lien { font: inherit; cursor: pointer; }
.bouton { display: inline-block; padding: 0.55rem 1rem; border: 1px solid #b9b9b3; border-radius: 5px; background: var(--carte); color: var(--texte); text-decoration: none; line-height: 1.3; }
.bouton:hover { border-color: var(--texte); }
.bouton-principal { background: var(--action); border-color: var(--action); color: #fff; font-weight: 600; }
.bouton-principal:hover { background: #172844; }
.bouton-danger { color: var(--danger); border-color: #d9b4b4; }
.bouton-danger:hover { border-color: var(--danger); }
.suppression-site { border-color: #d9b4b4; }
.suppression-site .bouton-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.suppression-site .bouton-danger:hover { filter: brightness(0.9); }
.suppression-site #f-confirmation { max-width: 22rem; }
button.lien { background: none; border: 0; padding: 0; color: var(--action); text-decoration: underline; text-underline-offset: 0.2em; }
.lien-danger { color: var(--danger) !important; }

/* Formulaires */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], select, textarea {
  font: inherit; color: inherit; width: 100%; padding: 0.55rem 0.65rem; border: 1px solid #a9a9a3; border-radius: 5px; background: #fff;
}
textarea { resize: vertical; line-height: 1.5; }
input[type="file"] { font: inherit; max-width: 100%; }
.fiche { background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; padding: clamp(1rem, 2.5vw, 1.75rem); max-width: 46rem; }
.fiche-large { max-width: 62rem; }
.fiche > h2:first-of-type, .fiche > h2:first-child { margin-top: 0; }
.fiche h2 { padding-top: 1.5rem; border-top: 1px solid var(--filet); }
.fiche > input[type="hidden"] + h2, .fiche > h2:first-child { padding-top: 0; border-top: 0; }
.champ { margin: 0 0 1.1rem; }
.champ > label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.champ > .aide { margin: -0.15rem 0 0.35rem; }
.case { margin: 0 0 0.8rem; }
.case label, .choix { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.case input, .choix input { margin-top: 0.3rem; flex: none; width: 1.05rem; height: 1.05rem; }
.choix { margin-bottom: 0.7rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
legend { font-weight: 600; padding: 0; margin-bottom: 0.6rem; }
.champ-couleur input { width: 5rem; height: 2.6rem; padding: 0.15rem; border: 1px solid #a9a9a3; border-radius: 5px; background: #fff; }
.bilingue { display: grid; gap: 0 1.25rem; }
@media (min-width: 48rem) { .bilingue { grid-template-columns: 1fr 1fr; } .bilingue:has(.editeur) { grid-template-columns: 1fr; } }
.tableau-champs { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 1.5rem 0 0; }
.zone-danger { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.zone-danger form { margin: 0; }
.bloc { margin: 1.5rem 0; background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; padding: 0.9rem 1.1rem; max-width: 62rem; }
.fiche .bloc { background: var(--fond); }
.bloc summary { cursor: pointer; font-weight: 600; }
.bloc[open] summary { margin-bottom: 0.9rem; }
.ligne-ajout { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.ligne-ajout label { font-weight: 600; }
.ligne-ajout input[type="text"], .ligne-ajout input[type="password"] { width: auto; flex: 1 1 14rem; max-width: 24rem; }
.fil { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; margin: -0.5rem 0 1.25rem; font-size: 0.9375rem; max-width: 62rem; }
.fil-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; color: var(--discret); }
.image-actuelle { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0 0 0.6rem; }
.image-actuelle img { max-height: 7rem; width: auto; border: 1px solid var(--filet); }

/* Tableau de bord */
.reperes { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: 1rem; }
.reperes a { display: block; height: 100%; background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; padding: 1rem 1.1rem; color: var(--texte); text-decoration: none; }
.reperes a:hover { border-color: var(--action); }
.reperes strong { display: block; font: 400 2rem/1.1 var(--serif); }
.raccourcis { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Listes (galeries, pages) */
.liste { list-style: none; margin: 0 0 1.5rem; padding: 0; max-width: 62rem; background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; }
.liste li { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.9rem; border-top: 1px solid var(--filet); background: var(--carte); }
.liste li:first-child { border-top: 0; border-radius: 6px 6px 0 0; }
.liste li:last-child { border-radius: 0 0 6px 6px; }
.liste-image { flex: none; width: 3.5rem; height: 3.5rem; background: var(--fond); display: grid; place-items: center; }
.liste-image img { max-width: 100%; max-height: 100%; width: auto; display: block; }
.liste-texte { flex: 1; min-width: 0; }
.liste-texte a { font-weight: 600; overflow-wrap: anywhere; }
.etat { flex: none; font-size: 0.8125rem; padding: 0.15rem 0.55rem; border-radius: 1rem; background: var(--fond); color: var(--discret); white-space: nowrap; }
.etat-ok { background: #e3f1e9; color: var(--ok); }
@media (max-width: 34rem) { .liste li { flex-wrap: wrap; } .liste .bouton { margin-left: auto; } }

/* Poignée de déplacement */
.poignee { flex: none; font: 1.1rem/1 var(--sans); width: 2.25rem; height: 2.25rem; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--discret); cursor: grab; touch-action: none; }
.poignee:hover, .poignee:focus-visible { border-color: var(--filet); background: var(--fond); color: var(--texte); }
.deplace { opacity: 0.55; outline: 2px dashed var(--action); outline-offset: -2px; }
.deplace .poignee { cursor: grabbing; }
.tri-etat { min-height: 1.5rem; margin: -0.75rem 0 1rem; color: var(--ok); font-size: 0.875rem; }

/* Grille d'images (œuvres, images des pages) */
.grille { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 45%), 1fr)); gap: 0.9rem; }
.grille li { background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; display: flex; flex-direction: column; min-width: 0; }
.grille li > a { display: block; padding: 0.5rem 0.5rem 0; color: var(--texte); text-decoration: none; flex: 1; }
.grille img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--fond); }
.grille-titre { display: block; font-size: 0.875rem; line-height: 1.3; padding: 0.4rem 0.1rem 0; overflow-wrap: anywhere; }
.grille-titre em { color: var(--discret); }
.grille-outils { display: flex; justify-content: space-between; align-items: center; padding: 0.15rem 0.3rem 0.3rem 0.6rem; margin: 0; min-height: 2.5rem; }
.grille-outils input[type="checkbox"] { width: 1.15rem; height: 1.15rem; }
.lot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 0.75rem; padding: 0.7rem 0.9rem; background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; max-width: 62rem; }
.lot select { width: auto; max-width: 100%; flex: 0 1 22rem; }

/* Envoi de photos */
.depot { background: var(--carte); border: 1px dashed #a9a9a3; border-radius: 6px; padding: 1rem 1.1rem; margin: 0 0 1.5rem; max-width: 62rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.depot label { flex: 1 1 100%; }
.depot-etat { flex: 1 1 100%; margin: 0; font-size: 0.9375rem; }
.depot-etat:empty { display: none; }
.depot-etat strong { color: var(--danger); font-weight: 600; }

/* Fiche d'une œuvre */
.oeuvre-edition { display: grid; gap: 1.5rem; align-items: start; max-width: 76rem; }
.oeuvre-edition figure { margin: 0; background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; padding: 0.75rem; text-align: center; }
.oeuvre-edition figure img { max-height: 70vh; width: auto; }
.oeuvre-edition figcaption { font-size: 0.875rem; margin-top: 0.5rem; }
@media (min-width: 60rem) { .oeuvre-edition { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } .oeuvre-edition figure { position: sticky; top: 1rem; } }

/* Livre d'or */
.mots { list-style: none; margin: 0 0 1rem; padding: 0; max-width: 62rem; }
.mot { background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; padding: 0.9rem 1.1rem; margin-bottom: 0.75rem; }
.mot p { margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.mot-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0; }

/* Tableau des sites */
.etats { list-style: none; margin: 0 0 1rem; padding: 0; }
.etats li { margin-bottom: 0.45rem; }
.etats .etat { display: inline-block; min-width: 7.5rem; text-align: center; margin-right: 0.5rem; }
.defilement { overflow-x: auto; background: var(--carte); border: 1px solid var(--filet); border-radius: 6px; }
.tableau { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.tableau th, .tableau td { padding: 0.55rem 0.8rem; text-align: left; border-top: 1px solid var(--filet); vertical-align: middle; }
.tableau thead th { border-top: 0; font-weight: 600; white-space: nowrap; }
.tableau .courant { background: var(--action-fond); }
.tableau form { margin: 0; }

/* Éditeur de texte */
.editeur textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.875rem; }
.editeur-barre { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.35rem; border: 1px solid #a9a9a3; border-bottom: 0; border-radius: 5px 5px 0 0; background: var(--fond); }
.editeur-barre button { font: inherit; font-size: 0.875rem; padding: 0.3rem 0.6rem; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; color: var(--texte); }
.editeur-barre button:hover { background: #fff; border-color: var(--filet); }
.editeur-barre button[aria-pressed="true"] { background: var(--action); color: #fff; }
.editeur-barre .separateur { width: 1px; background: var(--filet); margin: 0.15rem 0.25rem; }
.editeur-page { min-height: 16rem; max-height: 70vh; overflow-y: auto; padding: 0.9rem 1.1rem; border: 1px solid #a9a9a3; border-radius: 0 0 5px 5px; background: #fff; font: 400 1.0625rem/1.65 var(--serif); overflow-wrap: break-word; }
.editeur-page:focus { outline: 2px solid var(--action); outline-offset: -1px; }
.editeur-page > :first-child { margin-top: 0; }
.editeur-page h2 { font: 400 1.4rem/1.25 var(--serif); margin: 1.4em 0 0.5em; }
.editeur-page h3 { font: 600 1.1rem/1.3 var(--serif); margin: 1.3em 0 0.4em; }
.editeur-page blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 2px solid var(--discret); font-style: italic; }
.editeur-page img { max-width: min(100%, 24rem); }
.editeur-source textarea { border-radius: 0 0 5px 5px; }

/* Fenêtre de choix d'image */
dialog.choix-image { border: 1px solid var(--filet); border-radius: 8px; padding: 1.25rem; width: min(52rem, 94vw); max-height: 86vh; color: var(--texte); }
dialog.choix-image::backdrop { background: rgba(20, 20, 22, 0.55); }
.choix-image h2 { margin: 0 0 0.75rem; padding: 0; border: 0; }
.choix-image .grille button { border: 0; background: none; padding: 0.4rem; cursor: pointer; width: 100%; }
.choix-image .grille li:hover { border-color: var(--action); }

/* Page de connexion */
.connexion { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.connexion main { background: var(--carte); border: 1px solid var(--filet); border-radius: 8px; padding: 2rem; width: min(24rem, 100%); }
.connexion h1 { margin-bottom: 0.2rem; }
.connexion label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.connexion form p { margin: 0 0 1rem; }
.connexion .bouton { width: 100%; padding: 0.7rem; }

/* Cartes de choix illustrées (apparence) */
.cartes-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15.5rem, 100%), 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.cartes-choix-4 { grid-template-columns: repeat(auto-fill, minmax(min(12.5rem, 100%), 1fr)); }
.carte-choix { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 0.75rem; border: 1px solid var(--filet); border-radius: 6px; background: #fff; cursor: pointer; }
.carte-choix:hover { border-color: #8a8a84; }
.carte-choix input { position: absolute; top: 0.6rem; right: 0.6rem; width: 1.05rem; height: 1.05rem; }
.carte-choix:has(input:checked) { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); background: var(--action-fond); }
.carte-choix:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 2px; }
.carte-dessin { display: block; background: #fafafa; border: 1px solid var(--filet); border-radius: 3px; overflow: hidden; }
.carte-dessin svg { display: block; width: 100%; height: auto; }
.carte-texte strong { display: block; }
.p-o { fill: #b9bcc4; } .p-p { fill: #e6e6e2; } .p-t { fill: #3a3b40; } .p-b { fill: #fff; }
.p-l { stroke: #c9c9c4; stroke-width: 1; } .p-f { fill: none; stroke: #3a3b40; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Pistes audio d'une page */
.bloc-pistes { max-width: 62rem; }
.liste-pistes li { align-items: flex-start; }
.piste-edition { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; min-width: 0; }
.piste-ligne { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.piste-etiquette { flex: 0 0 3.6rem; font-size: 0.875rem; color: var(--discret); }
.piste-edition input[type="text"] { width: auto; flex: 1 1 11rem; }
.piste-edition .aide { flex: 1 1 100%; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------------
   Apparence : packs de couleurs, aperçu et réglage couleur par couleur.
   Les couleurs du pack arrivent par des variables --p-* posées sur chaque élément.
   --------------------------------------------------------------------------- */
.couleurs-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem); gap: 1.75rem; align-items: start; margin-top: 0.75rem; }
.couleurs-apercu { position: sticky; top: 1rem; }
@media (max-width: 60rem) { .couleurs-colonnes { grid-template-columns: minmax(0, 1fr); } .couleurs-apercu { position: static; max-width: 26rem; } }
.famille { margin: 1.1rem 0 0.45rem; font-size: 0.875rem; font-weight: 600; color: var(--discret); }
.famille:first-child { margin-top: 0; }
.packs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 34rem) { .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pack { position: relative; display: block; padding: 0.4rem 0.4rem 0.45rem; border: 1px solid var(--filet); border-radius: 6px; background: #fff; cursor: pointer; }
.pack:hover { border-color: #8a8a84; }
.pack input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pack:has(input:checked) { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); background: var(--action-fond); }
.pack:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 2px; }
.pack-nom { display: block; margin-top: 0.35rem; font-size: 0.8125rem; line-height: 1.25; }
.pack:has(input:checked) .pack-nom { font-weight: 600; }
/* Nuancier : un petit mur avec son bandeau, un titre, une ligne de texte, l'accent, un panneau et le pied */
.pack-nuancier { position: relative; display: block; height: 4.4rem; border-radius: 3px; overflow: hidden; background: var(--p-fond); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
.pack-nuancier i { position: absolute; display: block; }
.n-bandeau { left: 0; right: 0; top: 0; height: 24%; background: var(--p-bandeau); }
.n-bandeau::after { content: ""; position: absolute; left: 8%; top: 50%; width: 26%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--p-bandeau_texte); }
.n-titre { left: 8%; top: 36%; width: 38%; height: 5px; border-radius: 2px; background: var(--p-titres); }
.n-texte { left: 8%; top: 52%; width: 50%; height: 3px; border-radius: 2px; background: var(--p-texte); }
.n-accent { left: 8%; top: 65%; width: 22%; height: 3px; border-radius: 2px; background: var(--p-accent); }
.n-panneau { right: 8%; top: 34%; width: 24%; height: 38%; background: var(--p-panneau); box-shadow: 0 0 0 1px var(--p-filet); }
.n-pied { left: 0; right: 0; bottom: 0; height: 15%; background: var(--p-pied); box-shadow: 0 -1px 0 var(--p-filet); }

/* Aperçu : une page miniature dans la mise en page choisie */
.apercu { --ap-accent-b: var(--p-accent); --ap-voile: #000; --ap-photo: linear-gradient(120deg, #71838f, #c7b092 52%, #55634f); position: relative; display: grid; grid-template-columns: minmax(0, 1fr); font: 400 10px/1.4 var(--sans); background: var(--p-fond); color: var(--p-texte); border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16); }
.apercu span, .apercu em, .apercu small, .apercu u, .apercu b, .apercu i { font-style: normal; }
.ap-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.6em 1em; padding: 1.5em 1.7em; background: var(--p-bandeau); color: var(--p-bandeau_texte); }
.ap-nom { font: 400 1.6em/1.1 var(--serif); }
.ap-menu { display: flex; gap: 1.1em; font-size: 0.9em; }
.ap-menu b { font-weight: 400; padding-bottom: 0.15em; border-bottom: 1px solid var(--ap-accent-b); }
.ap-menu i { opacity: 0.82; }
.ap-ouverture { display: none; }
.ap-corps { padding: 1.7em; min-width: 0; }
.ap-titre { display: block; font: 400 2em/1.2 var(--serif); color: var(--p-titres); }
.ap-texte { display: block; margin: 0.35em 0 1.2em; }
.ap-texte u { text-decoration-color: var(--p-accent); text-underline-offset: 0.2em; }
.ap-oeuvres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; }
.ap-oeuvre { display: block; }
.ap-oeuvre i { display: block; padding: 0.7em; background: var(--p-panneau); box-shadow: inset 0 0 0 1px var(--p-filet); }
.ap-oeuvre i::before { content: ""; display: block; aspect-ratio: 4 / 5; }
.ap-o1::before { background: linear-gradient(168deg, #86aabd 0 46%, #dccba4 46% 63%, #5f7d6d 63%); }
.ap-o2::before { background: radial-gradient(circle at 30% 32%, #e6b24c 0 17%, transparent 18%), linear-gradient(#a2c4a5 0 56%, #5f8b50 56%); }
.ap-o3::before { background: linear-gradient(#f1aa6a 0 30%, #d8627b 30% 56%, #403b6c 56%); }
.ap-oeuvre em { display: block; margin-top: 0.5em; font: italic 400 1.05em/1.3 var(--serif); }
.ap-oeuvre small { display: block; font-size: 0.9em; color: var(--p-discret); }
.ap-pied { padding: 1.1em 1.7em; font-size: 0.9em; background: var(--p-pied); color: var(--p-pied_texte); box-shadow: 0 -1px 0 var(--p-filet); }
/* Catalogue */
.apercu[data-mise="centre"] .ap-entete { flex-direction: column; align-items: center; padding: 2em 1.7em 1.4em; }
.apercu[data-mise="centre"] .ap-nom { font-size: 2.3em; font-weight: 300; }
.apercu[data-mise="centre"] .ap-titre, .apercu[data-mise="centre"] .ap-texte, .apercu[data-mise="centre"] .ap-pied { text-align: center; }
/* Atelier */
.apercu[data-mise="lateral"] { grid-template-columns: 31% minmax(0, 1fr); grid-template-rows: 1fr auto; }
.apercu[data-mise="lateral"] .ap-entete { grid-row: 1 / span 2; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; gap: 1.6em; box-shadow: 1px 0 0 var(--p-filet); }
.apercu[data-mise="lateral"] .ap-menu { flex-direction: column; gap: 0.35em; align-items: flex-start; }
.apercu[data-mise="lateral"] .ap-corps, .apercu[data-mise="lateral"] .ap-pied { grid-column: 2; }
.apercu[data-mise="lateral"] .ap-oeuvres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apercu[data-mise="lateral"] .ap-oeuvre:nth-child(3) { display: none; }
/* Immersion : le menu posé sur l'image, le nom en très grand */
.apercu[data-mise="immersif"] .ap-entete, .apercu[data-mise="encre"] .ap-entete { position: absolute; z-index: 1; left: 0; right: 0; top: 0; background: none; padding: 1.1em 1.7em; }
.apercu[data-mise="immersif"] .ap-entete { color: #fff; justify-content: flex-end; }
.apercu[data-mise="immersif"] .ap-nom { display: none; }
.apercu[data-mise="immersif"] .ap-menu b { border-bottom-color: #fff; }
.apercu[data-mise="immersif"] .ap-ouverture { display: flex; flex-direction: column; justify-content: flex-end; min-height: 13em; padding: 1.5em 1.7em; color: #fff; background: linear-gradient(to bottom, color-mix(in srgb, var(--ap-voile) 45%, transparent) 0%, transparent 30%, transparent 45%, color-mix(in srgb, var(--ap-voile) 72%, transparent) 100%), var(--ap-photo); }
.apercu[data-mise="immersif"] .ap-accroche, .apercu[data-mise="immersif"] .ap-mention { display: none; }
.apercu[data-mise="immersif"] .ap-grand { font: 300 3.2em/1 var(--serif); letter-spacing: -0.02em; }
/* Encre de Chine : l'image d'ouverture prend la couleur du bandeau */
.apercu[data-mise="encre"] .ap-entete { color: var(--p-bandeau_texte); }
.apercu[data-mise="encre"] .ap-nom { font-size: 1.2em; font-weight: 600; }
.apercu[data-mise="encre"] .ap-menu { font-size: 0.72em; letter-spacing: 0.16em; text-transform: uppercase; }
.apercu[data-mise="encre"] .ap-ouverture { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7em; min-height: 15em; padding: 3.4em 1.7em 1.6em; text-align: center; color: var(--p-bandeau_texte); background: linear-gradient(color-mix(in srgb, var(--p-bandeau) 78%, transparent), var(--p-bandeau)), var(--ap-photo); }
.apercu[data-mise="encre"] .ap-accroche { font-size: 0.72em; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.68; }
.apercu[data-mise="encre"] .ap-grand { font: 500 2.7em/1 var(--serif); text-transform: uppercase; }
.apercu[data-mise="encre"] .ap-mention { font: italic 500 1.15em/1 var(--serif); color: var(--ap-accent-b); }
.apercu[data-mise="encre"] .ap-titre, .apercu[data-mise="encre"] .ap-texte, .apercu[data-mise="encre"] .ap-pied { text-align: center; }
.apercu[data-mise="encre"] .ap-titre::after { content: ""; display: block; width: 2.6em; height: 2px; margin: 0.35em auto 0; border-radius: 2px; background: var(--p-accent); }
.apercu[data-mise="encre"] .ap-oeuvre i { background: var(--p-fond); }
.apercu[data-mise="encre"] .ap-pied { box-shadow: none; font: italic 400 1.05em/1.3 var(--serif); }
.apercu-note { margin: 0.6rem 0 0; font-size: 0.875rem; color: var(--danger); min-height: 1.3em; }

.ajuster-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.6rem 1.25rem; margin: 0.75rem 0 1rem; }
.ajuster-champ { position: relative; display: flex; align-items: center; gap: 0.65rem; font-size: 0.9375rem; line-height: 1.3; cursor: pointer; }
.ajuster-champ input { flex: none; width: 3.1rem; height: 2.5rem; padding: 0.15rem; border: 1px solid #a9a9a3; border-radius: 5px; background: #fff; cursor: pointer; }
.ajuster-champ.modifie span::after { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-left: 0.45rem; border-radius: 50%; background: var(--action); vertical-align: 0.05em; }

/* Tableau de bord : encart de la formule gratuite */
.formule { max-width: 46rem; margin: 0 0 1.75rem; padding: 1rem 1.25rem; background: var(--carte); border: 1px solid var(--filet); border-left: 4px solid var(--action); border-radius: 0 6px 6px 0; }
.formule h2 { margin: 0 0 0.5rem; }
.formule ul { margin: 0 0 0.6rem; padding-left: 1.2rem; }
.formule p { margin: 0; }
.alerte .bouton { margin-left: 0.6rem; }

/* Inscription */
.inscription main { width: min(30rem, 100%); }
.inscription form .aide { margin: 0.1rem 0 0.3rem; }
.adresse-site { display: flex; align-items: stretch; border: 1px solid #a9a9a3; border-radius: 5px; background: #fff; overflow: hidden; }
.adresse-site span { display: flex; align-items: center; padding: 0 0.6rem; background: var(--fond); color: var(--discret); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; border-right: 1px solid var(--filet); }
.adresse-site input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; }
.piege { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

/* Création du site pas à pas */
.guide-fil { margin: 0 0 1.25rem; max-width: 62rem; }
.guide-compte { margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--discret); }
.guide-fil ol { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; list-style: none; margin: 0; padding: 0; counter-reset: pas; }
.guide-fil li { counter-increment: pas; display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.8rem 0.35rem 0.45rem; border: 1px solid var(--filet); border-radius: 2rem; background: var(--carte); font-size: 0.875rem; color: var(--discret); }
.guide-fil li::before { content: counter(pas); display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--fond); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.guide-fil li.courante { border-color: var(--action); color: var(--texte); font-weight: 600; }
.guide-fil li.courante::before { background: var(--action); color: #fff; }
.guide-fil li.faite::before { content: "\2713"; background: var(--action-fond); color: var(--action); }
.guide-fil li a { color: inherit; text-decoration: none; }
.guide-fil li a:hover { text-decoration: underline; }
.guide-intro { margin: 0 0 1.25rem; max-width: 60ch; font-size: 1.0625rem; }
.guide h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.guide-retour { margin-left: auto; }
.guide-photos { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0 0 0.5rem; padding: 0; }
.guide-photos img { display: block; height: 5.5rem; width: auto; border-radius: 3px; }
.guide-quitter { margin-top: 1.25rem; }
.guide-fin ul { padding-left: 1.2rem; }
.guide-fin h2 { margin-top: 1.75rem; }
.guide-fin .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 2rem; }
