/* bon-anniversaire.net : l'univers vient des cartes du site, du papier, des
   pointillés de découpe et des ciseaux. Angles droits, pas d'ombre floue. */
@font-face { font-family: "Permanent Marker"; src: url(/assets/fonts/permanent-marker.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: ABeeZee; src: url(/assets/fonts/abeezee.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: ABeeZee; font-style: italic; src: url(/assets/fonts/abeezee-italic.woff2) format("woff2"); font-display: swap; }
/* Caveat 500 (fontsource 5.0.8, SIL OFL, voir fonts/caveat-OFL.txt) : écriture du verso de la carte postale */
@font-face { font-family: Caveat; src: url(/assets/fonts/caveat-500.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --papier: #fff8ec;
  --feuille: #fffdf8;
  --encre: #222222;
  --doux: #5c544b;
  --orange: #fb9653;
  --orange-texte: #b4470f;
  --trait: #e5d8c3;
  --ciseaux: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M8.2 8 21 19M8.2 16 21 5'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 17px/1.65 ABeeZee, Helvetica, Arial, sans-serif; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
a { color: var(--orange-texte); text-underline-offset: 3px; }
a:hover { color: var(--encre); }
h1, h2, .marque, .pied-marque { font-family: "Permanent Marker", "Comic Sans MS", cursive; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(30px, 5.4vw, 46px); margin: 8px 0 18px; }
h2 { font-size: clamp(24px, 3.6vw, 31px); margin: 44px 0 10px; }
h3 { font-size: 18px; line-height: 1.35; }
.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

.entete { background: var(--encre); color: var(--papier); border-bottom: 3px dashed var(--orange); }
.entete-in { max-width: 1120px; margin: auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: center; justify-content: space-between; }
.marque { color: var(--orange); font-size: 27px; text-decoration: none; }
.marque:hover { color: #fff; }
.menu ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 22px; margin: 0; padding: 0; }
.menu a { color: var(--papier); text-decoration: none; font-size: 15.5px; padding: 6px 0; display: inline-block; }
.menu a:hover, .menu a[aria-current] { color: var(--orange); }

.feuille { max-width: 1120px; margin: 26px auto; background: var(--feuille); border: 1px solid var(--trait); padding: 18px 36px 42px; }
.gab-textes, .gab-article, .gab-page { max-width: 820px; }
.fil ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; padding: 0; font-size: 14px; color: var(--doux); }
.fil li + li::before { content: "/"; margin-right: 8px; color: var(--trait); }

/* Trait de coupe : la signature des cartes, reprise pour séparer les sections */
.prose h2 { padding-top: 26px; position: relative; border-top: 2px dashed var(--encre); }
.prose h2::before { content: ""; position: absolute; left: 12px; top: -13px; width: 24px; height: 24px; background: var(--feuille) var(--ciseaux) center/20px no-repeat; }
.prose > h2:first-child { margin-top: 12px; }
.accroche { color: var(--orange-texte); margin: -4px 0 16px; font-size: 18px; }
.consigne { background: var(--papier); border-left: 5px solid var(--orange); padding: 12px 16px; }
.centre { text-align: center; }
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin: 18px 0; }
.colonnes p { margin: 0; }
.colonnes a { display: block; padding: 12px; border: 2px dashed var(--encre); color: var(--encre); text-decoration: none; }
.colonnes a:hover { background: var(--orange); }

.voeu { margin: 14px 0; padding: 14px 18px; background: var(--papier); border: 1px solid var(--trait); border-left: 6px double var(--orange); }
.voeu p { margin: 0; }

.galerie { list-style: none; margin: 22px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px 22px; }
.tuile { position: relative; }
.tuile img { display: block; width: 100%; border: 1px solid var(--trait); }
/* Les textes des pages parlent de l'imprimante en haut à droite de la carte */
.imprimante { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 14px; line-height: 1.2; background: var(--orange); color: var(--encre); border: 2px solid var(--encre); box-shadow: 2px 2px 0 var(--encre); text-decoration: none; }
.imprimante::before { content: ""; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M7 8V3h10v5M7 17H4v-7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v7h-3'/%3E%3Cpath d='M7 14h10v7H7z'/%3E%3C/svg%3E") center/contain no-repeat; }
.imprimante:hover { background: #fff; color: var(--encre); }
/* Icône seule : le mot reste pour les lecteurs d'écran, la carte reste visible */
.imprimante { font-size: 0; gap: 0; padding: 6px; }
.imprimante::before { width: 20px; height: 20px; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border: 1px solid var(--trait); vertical-align: top; }
.prose th { background: var(--papier); font-weight: 400; font-family: "Permanent Marker", cursive; }
.prose h3 { margin: 22px 0 4px; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.tuile h3 { margin: 10px 0 8px; font-weight: 400; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bouton { font: inherit; font-size: 15px; line-height: 1.2; padding: 9px 13px; background: var(--orange); color: var(--encre); border: 2px solid var(--encre); text-decoration: none; cursor: pointer; display: inline-block; box-shadow: 3px 3px 0 var(--encre); }
.bouton:hover { background: var(--encre); color: var(--papier); }
.bouton:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--encre); }
.bouton.creux { background: var(--feuille); }
.bouton.creux:hover { background: var(--encre); }

.atelier { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 18px; }
.apercus { position: sticky; top: 12px; }
.apercus canvas { display: block; width: 100%; height: auto; border: 1px solid var(--trait); touch-action: none; background: #fff; box-shadow: 6px 6px 0 var(--trait); }
.apercus canvas.portrait { width: auto; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.faces { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 10px; }
.faces button { font: inherit; font-size: 15px; padding: 7px 12px; background: var(--feuille); color: var(--encre); border: 2px dashed var(--encre); cursor: pointer; }
.faces button + button { border-left: 0; }
.faces button[aria-pressed="true"] { background: var(--encre); color: var(--papier); border-style: solid; }
.legende { margin: 10px 0 4px; font-size: 14.5px; color: var(--doux); }
.onglets { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; border-bottom: 2px dashed var(--encre); }
.onglets button { font: inherit; font-size: 15px; line-height: 1.2; padding: 10px 6px 9px; background: none; border: 0; border-bottom: 5px solid transparent; color: var(--doux); cursor: pointer; text-align: left; }
.onglets b { font: 400 22px/1 "Permanent Marker", cursive; color: var(--orange-texte); margin-right: 4px; }
.onglets button[aria-selected="true"] { color: var(--encre); border-bottom-color: var(--orange); }
.reglages fieldset { border: 2px dashed var(--encre); margin: 0 0 18px; padding: 10px 16px 16px; min-width: 0; }
.reglages legend { font-family: "Permanent Marker", cursive; font-size: 21px; padding: 0 8px; }
.reglages label { display: block; margin: 10px 0; font-size: 15px; }
.reglages input:not([type="checkbox"]), .reglages select, .reglages textarea { display: block; width: 100%; margin-top: 3px; font: inherit; padding: 8px 10px; border: 1px solid var(--encre); background: #fff; color: var(--encre); border-radius: 0; }
.reglages input[type="file"] { padding: 6px; font-size: 14px; }
.reglages .case { display: flex; gap: 10px; align-items: flex-start; }
.case input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--orange-texte); }
.filtres, .deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 12px; }
.filtres label { margin-top: 0; }
.deux p { margin: 10px 0; align-self: end; }
.sous { margin: 14px 0 6px; font-size: 15px; }
.note { margin: 4px 0; font-size: 14px; color: var(--orange-texte); min-height: 0; }
.note:empty { display: none; }
.vide { padding: 12px; background: var(--papier); border-left: 5px solid var(--orange); }
.suite { margin: 16px 0 0; text-align: right; }
.choix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; max-height: 420px; overflow: auto; padding: 2px; }
.choix button { position: relative; padding: 0; border: 3px solid transparent; background: none; cursor: pointer; line-height: 0; }
.choix img { width: 100%; height: auto; aspect-ratio: 1748 / 1240; object-fit: cover; display: block; }
.choix span { position: absolute; left: 0; bottom: 0; background: var(--encre); color: var(--papier); font-size: 11.5px; line-height: 1.3; padding: 2px 5px; }
.choix button[aria-selected="true"] { border-color: var(--orange-texte); }
.mises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mises button { padding: 4px; background: #fff; border: 2px dashed var(--trait); cursor: pointer; font: inherit; font-size: 13px; line-height: 1.25; color: var(--encre); }
.mises canvas { display: block; width: 100%; height: auto; margin-bottom: 4px; }
.mises button[aria-checked="true"] { border: 2px solid var(--encre); box-shadow: 3px 3px 0 var(--orange); }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastilles button { font: inherit; font-size: 15px; padding: 7px 12px; background: var(--feuille); border: 2px solid var(--encre); cursor: pointer; color: var(--encre); }
.pastilles button[aria-checked="true"] { background: var(--orange); box-shadow: 3px 3px 0 var(--encre); }
.pastilles button[hidden] { display: none; }
.teintes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.teintes button { width: 38px; height: 38px; border: 2px solid var(--encre); cursor: pointer; padding: 0; }
.teintes button[aria-checked="true"] { outline: 3px solid var(--orange-texte); outline-offset: 2px; }
.idees { list-style: none; margin: 6px 0 10px; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--trait); }
.idees li + li { border-top: 1px dashed var(--trait); }
.idees button { display: block; width: 100%; text-align: left; font: inherit; font-size: 14.5px; line-height: 1.45; padding: 9px 12px; background: #fff; border: 0; cursor: pointer; color: var(--encre); }
.idees button:hover, .idees button:focus { background: var(--papier); }
.sorties { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sorties li { display: grid; grid-template-columns: 210px 1fr; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 2px dashed var(--trait); }
.sorties span { font-size: 14.5px; color: var(--doux); }
.sorties .bouton { width: 100%; text-align: center; }
.sorties .bouton:disabled { opacity: .6; cursor: progress; }
.vers-gen { margin: 18px 0; padding: 14px 16px; background: var(--papier); border: 2px dashed var(--encre); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.vers-gen p { margin: 0; flex: 1 1 260px; }
.voeu-carte { margin: -8px 0 16px; text-align: right; font-size: 14.5px; }

.articles { list-style: none; padding: 0; }
.articles li { display: flex; gap: 18px; padding: 16px 0; border-bottom: 2px dashed var(--trait); }
.articles img { width: 180px; flex: none; }
.articles h2 { margin: 0 0 6px; font-size: 23px; }
.articles h2 a { color: var(--encre); text-decoration: none; }
.pagination { display: flex; gap: 10px; margin-top: 20px; }
.aussi { margin-top: 36px; border-top: 2px dashed var(--encre); }
.aussi h2 { margin-top: 18px; }

/* Articles du Planning : image à la une et blocs jv-, dans l'univers papier et ciseaux */
.prose .une { margin: 4px 0 22px; }
.prose .une img { display: block; width: 100%; border: 1px solid var(--trait); }
.prose .jv-graphique { margin: 24px 0; }
.prose .jv-graphique figcaption { font-size: 14px; color: var(--doux); margin-top: 6px; }
.prose .jv-encadre { margin: 24px 0; padding: 14px 18px; background: var(--papier); border: 2px dashed var(--encre); }
.prose .jv-encadre > :last-child { margin-bottom: 0; }
.prose .jv-encadre-titre, .prose .jv-outil-titre { font-family: "Permanent Marker", cursive; font-size: 19px; line-height: 1.3; margin: 0 0 6px; }
.prose .jv-etapes { counter-reset: etape; list-style: none; padding: 0; margin: 20px 0; }
.prose .jv-etapes > li { counter-increment: etape; position: relative; padding: 2px 0 10px 48px; min-height: 34px; }
.prose .jv-etapes > li::before { content: counter(etape); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; background: var(--orange); border: 2px solid var(--encre); box-shadow: 2px 2px 0 var(--encre); font-family: "Permanent Marker", cursive; font-size: 17px; line-height: 1; }
.prose .jv-checklist { list-style: none; padding: 0; margin: 18px 0; }
.prose .jv-checklist > li { position: relative; padding: 2px 0 2px 34px; }
.prose .jv-checklist > li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border: 2px solid var(--encre); background: var(--feuille); }
.prose .jv-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; margin: 22px 0; }
.prose .jv-chiffres > p { margin: 0; padding: 12px 14px; background: var(--papier); border: 1px solid var(--trait); border-top: 4px solid var(--orange); }
.prose .jv-chiffres strong { display: block; font-family: "Permanent Marker", cursive; font-weight: 400; font-size: 28px; line-height: 1.2; color: var(--orange-texte); }
.prose .jv-graphique svg { display: block; width: 100%; height: auto; }
.prose .jv-outil { margin: 26px 0; padding: 16px 18px 18px; background: var(--feuille); border: 2px solid var(--encre); box-shadow: 5px 5px 0 var(--orange); }
.prose .jv-outil > p:not(.jv-outil-titre) { margin: 0 0 4px; }
.prose .jv-outil a { display: inline-block; margin-top: 8px; padding: 9px 13px; font-size: 15px; line-height: 1.2; background: var(--orange); color: var(--encre); border: 2px solid var(--encre); box-shadow: 3px 3px 0 var(--encre); text-decoration: none; }
.prose .jv-outil a:hover { background: var(--encre); color: var(--papier); }
.prose details { border-bottom: 2px dashed var(--trait); padding: 8px 0; }
.prose summary { cursor: pointer; font-weight: 700; }
.prose details > :not(summary) { margin: 8px 0 4px; }

.pied { background: var(--encre); color: var(--papier); margin-top: 40px; border-top: 3px dashed var(--orange); }
.pied-in { max-width: 1120px; margin: auto; padding: 26px 16px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; font-size: 15px; }
.pied a { color: var(--papier); }
.pied a:hover { color: var(--orange); }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied-marque { color: var(--orange); font-size: 24px; margin: 0 0 6px; }
.pied p { margin: 0; }

@media (max-width: 860px) {
  .atelier { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .apercus { position: sticky; top: 0; z-index: 2; background: var(--feuille); padding: 6px 0 4px; }
  .apercus canvas { width: auto; max-width: 100%; max-height: 32vh; margin: 0 auto; box-shadow: none; }
  .apercus canvas.portrait { max-height: 32vh; }
  .legende { display: none; }
  .pied-in { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .feuille { margin: 0; border: 0; padding: 12px 16px 30px; }
  .articles li { display: block; }
  .articles img { width: 100%; margin-bottom: 8px; }
  .galerie { grid-template-columns: minmax(0, 1fr); }
  .choix { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .sorties li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .reglages fieldset { padding: 8px 12px 14px; }
  .faces { justify-content: center; }
}
