/* bon-cadeau.com : univers « guichet de papeterie » (papier, encre, tampon rouge, perforations) */
:root {
  --papier: #f6f0e4;
  --papier-2: #efe6d4;
  --carte: #fffdf8;
  --encre: #1d1b17;
  --encre-2: #4a453c;
  --gris: #8a8172;
  --filet: #d9cfbd;
  --rouge: #c2362b;
  --rouge-f: #9e2a21;
  --kraft: #d8b78c;
  --vert: #2c6b70;
  --ombre: 0 3px 0 #d9cfbd;
  --r: 6px;
  --titre: "Fraunces", Georgia, serif;
  --texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 17px/1.62 var(--texte); }
img, canvas { max-width: 100%; display: block; }
a { color: var(--rouge-f); text-underline-offset: 3px; }
a:hover { color: var(--rouge); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--encre); color: #fff; padding: 6px 10px; z-index: 50; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.petit { font-size: 14px; color: var(--encre-2); }
h1, h2, h3 { font-family: var(--titre); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 14px; }

/* ---------- en-tête ---------- */
.top { background: var(--carte); border-bottom: 1px solid var(--filet); position: relative; z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.logo { text-decoration: none; color: var(--encre); }
.logo-ticket { display: inline-flex; align-items: stretch; font-family: var(--titre); font-weight: 800; font-size: 21px; line-height: 1; }
.logo-main { background: var(--encre); color: var(--papier); padding: 9px 12px 10px; border-radius: 4px 0 0 4px;
  -webkit-mask: radial-gradient(circle 5px at 100% 0, transparent 98%, #000) top/100% 51% no-repeat, radial-gradient(circle 5px at 100% 100%, transparent 98%, #000) bottom/100% 51% no-repeat;
  mask: radial-gradient(circle 5px at 100% 0, transparent 98%, #000) top/100% 51% no-repeat, radial-gradient(circle 5px at 100% 100%, transparent 98%, #000) bottom/100% 51% no-repeat; }
.logo-stub { background: var(--rouge); color: #fff; padding: 9px 10px 10px; border-left: 2px dashed var(--papier); border-radius: 0 4px 4px 0; font-family: var(--mono); font-weight: 700; font-size: 15px; display: flex; align-items: center; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-drop { position: relative; }
.nav-drop summary { list-style: none; cursor: pointer; padding: 8px 12px; font-weight: 600; border-radius: var(--r); user-select: none; }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 0 3px 8px; }
.nav-drop[open] summary, .nav-drop summary:hover { background: var(--papier-2); }
.nav-drop ul { position: absolute; right: 0; top: calc(100% + 6px); background: var(--carte); border: 1px solid var(--filet); box-shadow: 0 4px 0 var(--filet); border-radius: var(--r); padding: 10px; margin: 0; list-style: none; min-width: 230px; columns: 1; }
.nav-wide ul { min-width: 460px; columns: 2; column-gap: 12px; }
.nav-drop li a { display: block; padding: 5px 8px; color: var(--encre); text-decoration: none; border-radius: 4px; break-inside: avoid; }
.nav-drop li a:hover { background: var(--papier-2); color: var(--rouge-f); }

/* ---------- titre de page ---------- */
.crumbs { font-size: 14px; color: var(--gris); padding-top: 18px; }
.crumbs a { color: var(--encre-2); }
.hero { padding: 18px 0 22px; max-width: 860px; }
.hero-home { padding-top: 34px; }
.hero-kicker { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rouge); margin: 0 0 8px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); margin: 0 0 12px; }
.chapo p { font-size: 19px; color: var(--encre-2); margin: 0; }

/* ---------- générateur ---------- */
.gen { background: var(--papier-2); border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); padding: 26px 0 30px; scroll-margin-top: 10px; }
.gen-in { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.gen-apercu { position: sticky; top: 12px; }
.gen-papier { background: #fff; padding: 14px; border: 1px solid var(--filet); box-shadow: var(--ombre); border-radius: 3px; }
.gen-papier canvas { width: 100%; height: auto; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.gen-format { border: 0; padding: 0; margin: 0; display: flex; gap: 14px; font-size: 15px; }
.gen-format label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.gen-note { margin: 10px 0 0; }
.gen-form { background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); padding: 18px; box-shadow: var(--ombre); display: grid; gap: 16px; }
.gen-lab { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris); margin: 0 0 8px; }
.gen-designs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gen-design { background: #fff; border: 1px solid var(--filet); border-radius: 4px; padding: 4px 4px 3px; cursor: pointer; font: 600 12px var(--texte); color: var(--encre-2); }
.gen-design canvas { width: 100%; height: auto; aspect-ratio: 190 / 90; background: var(--papier-2); }
.gen-design span { display: block; margin-top: 3px; }
.gen-design.on { border-color: var(--encre); outline: 2px solid var(--encre); color: var(--encre); }
.gen-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.gen-photo { width: 72px; height: 48px; padding: 0; border: 1px solid var(--filet); border-radius: 4px; background: #fff; cursor: pointer; overflow: hidden; font: 600 12px var(--texte); color: var(--encre-2); display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
.gen-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gen-photo.on { outline: 3px solid var(--encre); outline-offset: 2px; }
.gen-photo-perso { border-style: dashed; }
.gen-photo-perso:focus-within { outline: 3px solid var(--encre); outline-offset: 2px; }
.gen-photo-note { margin: 6px 0 0; }
.ex-photo-titre { margin: 34px 0 4px; }
.gen-pals { display: flex; flex-wrap: wrap; gap: 8px; }
.gen-pal { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--filet); cursor: pointer; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); padding: 0; }
.gen-pal.on { outline: 3px solid var(--encre); outline-offset: 2px; }
.gen-pal[data-palette="encre"] { --c1: #fbf7ef; --c2: #c2362b; }
.gen-pal[data-palette="kraft"] { --c1: #d8b78c; --c2: #b3261e; }
.gen-pal[data-palette="ocean"] { --c1: #d9e8f4; --c2: #1f6fb2; }
.gen-pal[data-palette="sauge"] { --c1: #dfe6d5; --c2: #5f8460; }
.gen-pal[data-palette="rose"] { --c1: #f6dad8; --c2: #c4466a; }
.gen-pal[data-palette="nuit"] { --c1: #17213a; --c2: #d4a64a; }
.gen-pal[data-palette="soleil"] { --c1: #fde6b2; --c2: #e4602a; }
.gen-pal[data-palette="sapin"] { --c1: #163828; --c2: #b52f2c; }
.gen-pal[data-palette="lavande"] { --c1: #e5ddf3; --c2: #7560b0; }
.gen-pal[data-palette="corail"] { --c1: #fcddd2; --c2: #e9553a; }
.gen-pal[data-palette="ardoise"] { --c1: #dbe4e6; --c2: #2c6b70; }
.gen-pal[data-palette="or"] { --c1: #2a2418; --c2: #a9863a; }
.gen-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.gen-champs label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--encre-2); }
.gen-champs .full { grid-column: 1 / -1; }
.gen-champs input, .gen-champs select, .gen-champs textarea { font: 16px var(--texte); color: var(--encre); background: #fff; border: 1px solid var(--filet); border-radius: 4px; padding: 8px 10px; width: 100%; }
.gen-champs input:focus, .gen-champs select:focus, .gen-champs textarea:focus { outline: 2px solid var(--encre); border-color: var(--encre); }
.gen-champs textarea { resize: vertical; }
.gen-champs .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.gen-champs .check input { width: auto; }

.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 16px var(--texte); padding: 11px 18px; border-radius: var(--r); border: 1px solid var(--encre); background: var(--carte); color: var(--encre); cursor: pointer; box-shadow: 0 3px 0 var(--encre); transition: transform .08s; text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--encre); }
.btn-main { background: var(--rouge); border-color: var(--rouge-f); color: #fff; box-shadow: 0 3px 0 var(--rouge-f); }
.btn-main:hover { background: var(--rouge-f); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-mini { font-size: 14px; padding: 6px 11px; box-shadow: 0 2px 0 var(--encre); }

/* ---------- blocs ---------- */
.bloc { padding: 38px 16px 6px; }
.ex-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ex { margin: 0; background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); padding: 12px; box-shadow: var(--ombre); }
.ex img { width: 100%; height: auto; border-radius: 2px; }
.ex figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: 14px; color: var(--encre-2); }
.gal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.gal { text-decoration: none; color: var(--encre-2); font-size: 14px; font-weight: 600; }
.gal img { width: 100%; height: auto; border: 1px solid var(--filet); border-radius: 3px; margin-bottom: 5px; background: #fff; }
.gal:hover span { color: var(--rouge-f); }

.textes-liste { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.textes-liste button { width: 100%; height: 100%; text-align: left; font: 16px/1.45 var(--texte); color: var(--encre); background: var(--carte); border: 1px dashed var(--gris); border-radius: var(--r); padding: 12px 14px 12px 40px; cursor: pointer; position: relative; }
.textes-liste button::before { content: "✎"; position: absolute; left: 13px; top: 11px; color: var(--rouge); font-size: 17px; }
.textes-liste button:hover { border-style: solid; border-color: var(--encre); }

.prose { max-width: 820px; padding-top: 30px; padding-bottom: 10px; }
.prose section { margin: 0 0 28px; }
.prose h2 { font-size: clamp(23px, 2.6vw, 29px); }
.prose p, .prose li { color: #2b2823; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--rouge); }

.faq details { background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); margin-bottom: 10px; max-width: 820px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font: 700 22px var(--mono); color: var(--rouge); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 16px; color: var(--encre-2); }

.vois-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-bottom: 40px; }
.vois { display: block; background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); padding: 8px 8px 10px; text-decoration: none; color: var(--encre); font-weight: 600; box-shadow: var(--ombre); }
.vois img { width: 100%; height: auto; margin-bottom: 8px; border-radius: 2px; }
.vois:hover { color: var(--rouge-f); border-color: var(--encre); }

.env-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.env-grid img { width: 100%; height: auto; border: 1px solid var(--filet); background: #fff; }
.env-form { display: grid; gap: 14px; background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); padding: 18px; box-shadow: var(--ombre); }
.env-form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.env-form input, .env-form select { font: 16px var(--texte); padding: 8px 10px; border: 1px solid var(--filet); border-radius: 4px; background: #fff; }

.gen-eco { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.gen-eco input { width: 17px; height: 17px; accent-color: var(--encre); }
.gen-mode-eco .gen-photos { opacity: 0.45; }

/* ---------- pied de page ---------- */
.foot { background: var(--encre); color: #d8d0c0; margin-top: 30px; font-size: 15px; }
.perfo { height: 14px; background: radial-gradient(circle 6px at 10px 0, var(--papier) 98%, transparent) 0 0 / 20px 14px repeat-x; }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: baseline; padding-top: 26px; padding-bottom: 14px; }
.foot-logo { font: 800 20px var(--titre); color: #fff; margin: 0; }
.foot-txt { margin: 0; font-size: 14px; }
.foot-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.foot a { color: #d8d0c0; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-bas { font-size: 13px; color: #9b9283; padding-bottom: 22px; margin: 0 auto; }
.legal { max-width: 820px; padding-bottom: 40px; }

@media (max-width: 900px) {
  .gen-in { grid-template-columns: 1fr; }
  .gen-apercu { position: static; }
  .gen-designs { grid-template-columns: repeat(4, 1fr); }
  .gal-grid, .vois-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .env-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top-in { padding-top: 10px; padding-bottom: 6px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav-drop { position: static; }
  .nav { gap: 0; flex-wrap: nowrap; }
  .nav-drop summary { padding: 8px 4px; font-size: 15px; }
  .nav-drop summary::after { margin-left: 5px; width: 6px; height: 6px; }
  .nav-drop ul, .nav-wide ul { left: 16px; right: 16px; min-width: 0; columns: 2; }
  .ex-grid, .textes-liste { grid-template-columns: 1fr; }
  .ex figcaption { flex-direction: column; align-items: flex-start; }
  .gen-designs { grid-template-columns: repeat(3, 1fr); }
  .gen-champs { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .chapo p { font-size: 17px; }
}
@media print {
  .top, .foot, .gen-form, .gen-actions { display: none; }
}

/* ---------- blog (articles livrés par le Planning du dash) ---------- */
.blog-bloc { padding-bottom: 30px; }
.blog-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.blog-carte a { display: flex; flex-direction: column; height: 100%; background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); box-shadow: var(--ombre); color: var(--encre); text-decoration: none; overflow: hidden; }
.blog-carte a:hover { border-color: var(--encre); }
.blog-carte a:hover strong { color: var(--rouge-f); }
.blog-carte img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 2px dashed var(--filet); }
.blog-carte-txt { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.blog-carte-txt strong { font: 800 20px/1.2 var(--titre); }
.blog-carte-haut { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gris); }
.blog-rub { color: var(--rouge); }
.blog-extrait { font-size: 15px; color: var(--encre-2); }
.blog-tete { max-width: 820px; }
.blog-tete .hero { padding-bottom: 18px; }
.blog-meta { font: 13px var(--mono); color: var(--gris); margin: 14px 0 0; }
.blog-prose { padding-top: 6px; }
.blog-prose .blog-une { margin: 0 0 30px; background: #fff; padding: 10px; border: 1px solid var(--filet); box-shadow: var(--ombre); border-radius: 3px; }
.blog-prose .blog-une img, .blog-prose figure img { width: 100%; height: auto; }
.blog-prose figure { margin: 28px 0; }
.blog-prose figcaption { font-size: 14px; color: var(--gris); margin-top: 8px; }
.blog-prose h3 { font-size: clamp(19px, 2.2vw, 23px); margin: 26px 0 10px; }
.blog-prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; background: var(--carte); border: 1px solid var(--filet); }
.blog-prose caption { caption-side: top; text-align: left; font: 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--rouge); padding: 0 0 8px; }
.blog-prose th, .blog-prose td { padding: 10px 12px; border-bottom: 1px dashed var(--filet); text-align: left; vertical-align: top; }
.blog-prose thead th { background: var(--encre); color: var(--papier); font-weight: 600; border-bottom: 0; }
.blog-prose details { background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); margin: 0 0 10px; }
.blog-prose summary { cursor: pointer; padding: 13px 40px 13px 16px; font-weight: 600; list-style: none; position: relative; }
.blog-prose summary::-webkit-details-marker { display: none; }
.blog-prose summary::after { content: "+"; position: absolute; right: 16px; top: 9px; font: 700 22px var(--mono); color: var(--rouge); }
.blog-prose details[open] summary::after { content: "−"; }
.blog-prose details > :not(summary) { margin: 0; padding: 0 16px 14px; color: var(--encre-2); }

/* Blocs utiles des articles (classes jv- du Planning), en papeterie */
.blog-prose .jv-encadre { margin: 28px 0; padding: 16px 20px; background: var(--carte); border: 1px solid var(--filet); border-left: 5px solid var(--rouge); border-radius: 0 var(--r) var(--r) 0; box-shadow: var(--ombre); }
.blog-prose .jv-encadre > :last-child { margin-bottom: 0; }
.blog-prose .jv-encadre-titre { font: 700 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--rouge); margin: 0 0 6px; }
.blog-prose .jv-etapes { counter-reset: jv; list-style: none; padding: 0; margin: 24px 0; }
.blog-prose .jv-etapes > li { counter-increment: jv; position: relative; padding: 2px 0 14px 54px; margin: 0; }
.blog-prose .jv-etapes > li::before { content: "N° " counter(jv, decimal-leading-zero); position: absolute; left: 0; top: 1px; font: 700 11px/1 var(--mono); color: var(--rouge); border: 1.5px solid var(--rouge); border-radius: 3px; padding: 5px 4px; transform: rotate(-4deg); background: var(--carte); }
.blog-prose .jv-checklist { list-style: none; padding: 0; margin: 24px 0; }
.blog-prose .jv-checklist > li { position: relative; padding: 3px 0 3px 34px; margin: 0 0 4px; }
.blog-prose .jv-checklist > li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 18px; height: 18px; border: 2px solid var(--encre); border-radius: 2px; background: var(--carte); }
.blog-prose .jv-chiffres { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin: 28px 0; }
.blog-prose .jv-chiffres > p { margin: 0; padding: 14px 16px; background: var(--carte); border: 1px solid var(--filet); border-top: 3px dashed var(--kraft); border-radius: 0 0 var(--r) var(--r); font-size: 15px; color: var(--encre-2); }
.blog-prose .jv-chiffres strong { display: block; font: 800 28px/1.15 var(--titre); color: var(--rouge-f); margin-bottom: 4px; }
.blog-prose .jv-graphique { background: var(--carte); border: 1px solid var(--filet); border-radius: var(--r); padding: 16px; }
.blog-prose .jv-graphique svg { width: 100%; height: auto; display: block; }
.blog-prose .jv-outil { position: relative; margin: 30px 0; padding: 18px 22px 20px 30px; background: var(--encre); color: var(--papier); border-radius: var(--r); }
.blog-prose .jv-outil::before { content: ""; position: absolute; left: 12px; top: 10px; bottom: 10px; border-left: 2px dashed rgba(246, 240, 228, 0.45); }
.blog-prose .jv-outil p { color: #d8d0c0; margin: 0 0 10px; }
.blog-prose .jv-outil .jv-outil-titre { font: 800 21px/1.2 var(--titre); color: #fff; margin: 0 0 6px; }
.blog-prose .jv-outil a { display: inline-flex; font: 600 16px var(--texte); padding: 10px 16px; border-radius: var(--r); background: var(--rouge); color: #fff; border: 1px solid var(--rouge-f); box-shadow: 0 3px 0 var(--rouge-f); text-decoration: none; }
.blog-prose .jv-outil a:hover { background: var(--rouge-f); }
.blog-cta { max-width: 820px; margin: 10px auto 0; }
.blog-cta-in { background: var(--papier-2); border: 2px dashed var(--encre); border-radius: var(--r); padding: 20px 22px; }
.blog-cta-in p { margin: 0 0 12px; color: var(--encre-2); }
.blog-cta-in .blog-cta-titre { font: 800 22px/1.2 var(--titre); color: var(--encre); margin-bottom: 6px; }
@media (max-width: 640px) {
  .blog-prose table { display: block; overflow-x: auto; }
  .blog-prose .jv-etapes > li { padding-left: 50px; }
  .blog-carte-txt strong { font-size: 19px; }
}
