/* La Boutique de Franck — Galerie */
:root {
  --creme: #fbf6ef;
  --papier: #fffdf9;
  --bois: #ead6bb;
  --bois-clair: #f4e9da;
  --caramel: #b5784a;
  --caramel-fonce: #8e5a34;
  --brun: #3a2419;
  --texte: #4a3428;
  --ligne: #eadbc8;
  --ombre: 0 10px 30px -14px rgba(58, 36, 25, .35);
  --rayon: 18px;
  --titre: "Fredoka", system-ui, sans-serif;
  --script: "Caveat", cursive;
  --corps: "Nunito", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--texte);
  font: 400 1.0625rem/1.65 var(--corps);
}
img { max-width: 100%; display: block; }
p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
a { color: var(--caramel-fonce); }
h1, h2, h3 { font-family: var(--titre); color: var(--brun); font-weight: 600; line-height: 1.15; margin: 0; }
.script { font-family: var(--script); color: var(--caramel); font-weight: 700; font-size: 1.25em; line-height: .9; }

/* En-tête */
.entete {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--papier);
  border-bottom: 1px solid var(--ligne);
  position: sticky; top: 0; z-index: 10;
}
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brun);
  font: 500 1.15rem var(--titre); }
.marque img { width: 48px; height: 48px; }
.marque em { font: 700 1.6rem/1 var(--script); color: var(--caramel); font-style: normal; }
.entete-lien { text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 14px; border-radius: 999px; }
.entete-lien:hover { background: var(--bois-clair); }

/* Hero */
main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.hero { text-align: center; padding: clamp(36px, 6vw, 72px) 0 28px; max-width: 760px; margin: 0 auto; }
.surtitre { text-align: center; letter-spacing: .22em; text-transform: uppercase; font-size: .8rem;
  color: var(--caramel-fonce); margin: 0 0 14px; font-weight: 700; }
.surtitre i { font-style: normal; color: var(--caramel); margin: 0 .4em; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.intro { margin: 18px auto 0; color: var(--texte); }

/* Filtres */
.filtres { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  background: var(--papier); color: var(--brun); border: 1px solid var(--ligne);
  font: 500 .95rem var(--titre); transition: background .2s, color .2s, border-color .2s;
}
.chip span { font-size: .75rem; background: var(--bois-clair); color: var(--caramel-fonce);
  border-radius: 999px; padding: 1px 8px; }
.chip:hover { border-color: var(--caramel); }
.chip.actif { background: var(--brun); color: var(--creme); border-color: var(--brun); }
.chip.actif span { background: var(--caramel); color: #fff; }

/* Grille */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.carte {
  background: var(--papier); border-radius: var(--rayon); overflow: hidden;
  box-shadow: var(--ombre); display: flex; flex-direction: column;
  animation: apparait .45s ease both;
}
.carte[hidden] { display: none; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.carte-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--bois-clair); cursor: zoom-in; }
.carte-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.carte-img:hover img, .carte-img:focus-visible img { transform: scale(1.05); }
.prix {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--brun); color: var(--creme); font: 600 .95rem var(--titre);
  padding: 5px 12px; border-radius: 999px;
}
.carte-corps { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag { align-self: flex-start; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--caramel-fonce); }
.carte h2 { font-size: 1.2rem; }
.desc { margin: 0; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.carte .btn { margin-top: auto; align-self: flex-start; }

/* Emplacements vides */
.carte-vide .carte-img { cursor: default; display: grid; place-items: center; font-size: 3rem; opacity: .7;
  background: repeating-linear-gradient(45deg, var(--bois-clair) 0 14px, #f8f0e5 14px 28px); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: 999px; padding: 10px 18px;
  background: var(--caramel); color: #fff; text-decoration: none;
  font: 600 .95rem var(--titre); transition: background .2s, transform .2s;
}
.btn:hover { background: var(--caramel-fonce); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-clair { background: var(--creme); color: var(--brun); }
.btn-clair:hover { background: #fff; }
.btn-large { padding: 13px 24px; font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }

/* Sur mesure */
.sur-mesure {
  margin: clamp(48px, 7vw, 80px) 0; padding: clamp(28px, 5vw, 48px);
  background: var(--brun); color: var(--creme); border-radius: 28px; text-align: center;
}
.sur-mesure h2 { color: var(--creme); font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.sur-mesure .script { color: #e2b88c; }
.sur-mesure p { max-width: 620px; margin: 14px auto 22px; }

/* Pied */
.pied { text-align: center; padding: 28px 16px 40px; color: var(--caramel-fonce); font-family: var(--titre); }
.pied p { text-align: center; margin: 0; }

/* Dialogues */
dialog { border: 0; padding: 0; color: var(--texte); }
dialog::backdrop { background: rgba(30, 18, 12, .82); backdrop-filter: blur(3px); }
.lb-fermer {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--papier); color: var(--brun); font-size: 1.7rem; line-height: 1;
  box-shadow: var(--ombre);
}

.lightbox { width: min(1160px, 96vw); max-height: 94vh; background: var(--papier); border-radius: 22px; overflow: hidden; }
.lb-contenu { margin: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); max-height: 94vh; }
.lb-image { background: #1f140e; display: grid; place-items: center; min-height: 300px; }
.lb-image img { max-height: 94vh; width: auto; max-width: 100%; object-fit: contain; }
.lb-infos { padding: 56px 28px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.lb-titre { font-size: 1.6rem; }
.lb-prix { margin: 0; font: 600 1.3rem var(--titre); color: var(--caramel); }
.lb-prix:empty { display: none; }
.lb-desc { margin: 0; white-space: pre-line; }
.lb-infos .btn { align-self: flex-start; margin-top: 8px; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 253, 249, .9); color: var(--brun); font-size: 2rem; line-height: 1;
}
.lb-prec { left: 12px; }
.lb-suiv { right: 12px; }
.lb-image { position: relative; }
.lb-nav[hidden] { display: none; }

.modale { width: min(620px, 94vw); max-height: 92vh; background: var(--papier); border-radius: 22px; overflow-y: auto; }
.modale form { padding: 32px clamp(18px, 4vw, 34px) 28px; }
.modale h2 { font-size: 1.7rem; margin-bottom: 16px; padding-right: 40px; }
.dd-produit { display: flex; gap: 14px; align-items: center; background: var(--bois-clair);
  border-radius: 14px; padding: 12px; margin-bottom: 18px; }
.dd-produit img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.dd-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--caramel-fonce); font-weight: 700; }
.dd-nom { font-family: var(--titre); color: var(--brun); font-weight: 600; }
.champ { margin-bottom: 14px; }
.champ label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 5px; color: var(--brun); }
.champ label i { font-weight: 400; color: var(--caramel-fonce); }
.champ input[type=text], .champ input[type=email], .champ input[type=tel], .champ textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--ligne);
  background: #fff; font: inherit; color: var(--texte); transition: border-color .2s;
}
.champ textarea { resize: vertical; min-height: 110px; }
.champ input:focus, .champ textarea:focus { outline: none; border-color: var(--caramel); }
.champ.invalide input, .champ.invalide textarea { border-color: #c0392b; }
.champ-case label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.champ-case input { margin-top: 4px; accent-color: var(--caramel); width: 18px; height: 18px; flex: none; }
.err { display: block; color: #c0392b; font-size: .82rem; min-height: 0; }
.err:empty { display: none; }
.ligne-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dd-retour { text-align: left; margin: 0 0 12px; font-weight: 700; }
.dd-retour:empty { display: none; }
.dd-retour.ok { color: #2e7d32; }
.dd-retour.ko { color: #c0392b; }

.page-simple { max-width: 640px; margin: 80px auto; padding: 0 16px; }

@media (max-width: 760px) {
  .lb-contenu { grid-template-columns: 1fr; overflow-y: auto; }
  .lb-image img { max-height: 60vh; }
  .lb-infos { padding: 20px 20px 24px; }
  .ligne-2 { grid-template-columns: 1fr; }
  .marque span { font-size: 1rem; }
  .marque em { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
[hidden] { display: none !important; }
