:root {
  /* Valeurs par défaut (vert du logo) ; remplacées par Admin > Contenu du site > Couleurs */
  --ink: #1f261c;
  --ink-2: #575c55;
  --muted: #6b7068;
  --line: #e0e4dc;
  --paper: #f6f8f2;
  --white: #fff;
  --accent: #3f7d1f;
  --accent-dark: #316218;
  --brand: #80b054;
  --brand-soft: #ecf3e5;
  --ok: #1f7a4d;
  --danger: #b42318;
  --radius: 10px;
  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent), 0 4px 14px color-mix(in srgb, var(--ink) 6%, transparent);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.right { text-align: right; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 12px; z-index: 100; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: .4em; padding: .6em 1.1em; border-radius: 999px; border: 2px solid transparent; font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); color: var(--white); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-lg { padding: .8em 1.4em; font-size: 1rem; }
.badge { background: var(--white); color: var(--accent); border-radius: 999px; padding: 0 .5em; font-size: .8em; }
.link { background: none; border: 0; color: var(--accent-dark); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* En-tête */
.topbar { background: var(--ink); color: color-mix(in srgb, #fff 82%, var(--ink)); font-size: .85rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .3em 1.5em; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: var(--white); text-decoration: none; font-weight: 600; }
.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: var(--white); font: 700 1.3rem var(--serif); box-shadow: inset 0 -4px 0 var(--brand); }
.logo-text { font: 700 1.2rem/1.1 var(--serif); }
.logo-text small { display: block; font: 400 .75rem var(--sans); color: var(--muted); margin-top: 3px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 2px; }
.nav > ul > li > a, .btn { white-space: nowrap; }
.logo-text { white-space: nowrap; }
.summary .hint.center { margin-top: 14px; }
@media (max-width: 1440px) and (min-width: 1181px) {
  .nav > ul > li > a:not(.btn) { padding: 10px 8px; font-size: .95rem; }
  .logo-text small { display: none; }
}
.nav > ul > li > a:not(.btn) { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 8px; }
.nav > ul > li > a:not(.btn):hover { background: var(--paper); }
.nav .btn { margin-left: 6px; }
.has-sub { position: relative; }
.sub { display: none; position: absolute; left: 0; top: 100%; min-width: 240px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px !important; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.sub a:hover { background: var(--paper); }
.nav-toggle { display: none; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-block; background: var(--ink); color: var(--white); border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 110px); overflow: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; padding: 10px 20px 20px; }
  .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 12px !important; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .topbar span:nth-child(1) { display: none; }
}

/* Messages */
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius); background: #eef6f1; color: var(--ok); border: 1px solid #cfe6d9; }
.flash-error { background: #fbeeee; color: var(--danger); border-color: #f0cfd0; }
.flash-info { background: var(--paper); color: var(--ink); border-color: var(--line); }

/* Compte client */
.auth-links { display: flex; flex-wrap: wrap; gap: .4em 1.2em; margin-top: 18px; }
.account-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.account-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.order-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.order-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.order-card .table { margin: .6em 0 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }

/* Accueil */
.hero { background: linear-gradient(135deg, #fff 0%, var(--brand-soft) 100%); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; padding: 64px 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.hero-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.hero-card .footer-title { color: var(--ink); }
.hero.has-image {
  background: linear-gradient(90deg, color-mix(in srgb, var(--paper) 97%, transparent) 0%, color-mix(in srgb, var(--paper) 90%, transparent) 42%, color-mix(in srgb, var(--paper) 35%, transparent) 75%, color-mix(in srgb, var(--paper) 15%, transparent) 100%),
              var(--hero-img) center / cover no-repeat;
}
@media (max-width: 900px) {
  .hero.has-image { background: linear-gradient(color-mix(in srgb, var(--paper) 90%, transparent), color-mix(in srgb, var(--paper) 90%, transparent)), var(--hero-img) center / cover no-repeat; }
}
.logo-img { display: block; max-height: 76px; max-width: 220px; width: auto; margin: 4px 0; }
@media (max-width: 560px) { .logo-img { max-height: 60px; } }
.rich h3 { font-size: 1.25rem; margin-top: 1.4em; }
.rich ul, .rich ol { padding-left: 1.3em; }
.phone { display: inline-block; font: 700 1.4rem var(--serif); color: var(--ink); text-decoration: none; margin-top: 8px; }
.section { padding: 56px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: 1.6rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tiles a { display: flex; flex-direction: column; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; transition: border-color .15s, transform .15s; }
.tiles a:hover { border-color: var(--brand); transform: translateY(-2px); }
.tiles small { color: var(--muted); font-weight: 400; }
.brands { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.brands a { display: block; padding: 14px 26px; border: 1px solid var(--line); border-radius: 999px; font: 700 1.1rem var(--serif); color: var(--ink); text-decoration: none; background: var(--paper); }
.brands a:hover { border-color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps .section-title { font-size: 1.3rem; }

/* Pied de page */
.footer { background: var(--ink); color: color-mix(in srgb, #fff 80%, var(--ink)); margin-top: 40px; }
.footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 48px 20px 24px; }
.footer-title { font: 700 1.05rem var(--serif); color: var(--white); margin-bottom: .6em; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 20px; font-size: .85rem; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: 6px; }

/* Boutique */
.page { padding-top: 28px; padding-bottom: 40px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 32px; align-items: start; }
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow: auto; }
.filters label { font-weight: 700; display: block; margin-bottom: 4px; }
.filter-title { font-weight: 700; margin: 18px 0 6px; font-family: var(--serif); }
.filter-list a { color: var(--ink-2); text-decoration: none; display: block; padding: 3px 8px; border-radius: 6px; }
.filter-list a:hover { background: var(--paper); }
.filter-list a.active { background: var(--ink); color: var(--white); }
.reset { display: inline-block; margin-top: 14px; font-size: .9rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted); }
.toolbar p { margin: 0; }
.toolbar form { display: flex; gap: 8px; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: var(--white); padding: 14px; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.noimg { color: var(--muted); font-size: .9rem; display: grid; place-items: center; background: var(--paper); width: 100%; height: 100%; }
.tag { position: absolute; top: 10px; left: 10px; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag-sale { background: var(--accent); color: var(--white); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.card-brand { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.card-title { font-size: 1.02rem; margin-bottom: 10px; }
.card-title a { color: var(--ink); text-decoration: none; }
.price { margin: auto 0 0; font-weight: 700; font-size: 1.05rem; }
.price del { color: var(--muted); font-weight: 400; font-size: .9em; margin-right: 6px; }
.price-lg { font: 700 1.8rem var(--serif); margin: .4em 0 .6em; }
.price-lg small { font: 400 .9rem var(--sans); color: var(--muted); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pager a, .pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink); }
.pager [aria-current] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.empty { padding: 24px; background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Fiche produit */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); cursor: pointer; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.buy h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.checks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 6px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.buy .actions form { margin: 0; }
.note { font-size: .92rem; color: var(--ink-2); background: var(--white); border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.meta { font-size: .85rem; color: var(--muted); }
.specs, .table { width: 100%; border-collapse: collapse; margin: 1em 0; background: var(--white); }
.specs th, .specs td, .table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 55%; font-weight: 600; color: var(--ink-2); }
.table input[type=number] { width: 80px; }

/* Description en blocs standardisés */
.desc { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.block { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; overflow-wrap: anywhere; }
.block img { display: block; margin: 0 auto 14px; max-height: 220px; width: auto; max-width: 100%; object-fit: contain; }
.block h3 { font-size: 1.1rem; }
.block ul, .block ol { padding-left: 1.2em; }
.block p:last-child, .block ul:last-child { margin-bottom: 0; }
.block table { width: 100%; border-collapse: collapse; }
.block th, .block td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.specs-full { max-width: 860px; }
.specs-group th { background: var(--paper); font: 700 1.05rem var(--serif); color: var(--ink); padding-top: 18px; }

/* Achat */
.buy-form { display: flex; gap: 10px; align-items: stretch; margin: 1.2em 0 .6em; }
.buy-form .qty { width: 80px; text-align: center; font-size: 1.1rem; }
.buy .actions { margin: .6em 0 1em; }
.btn-block { width: 100%; justify-content: center; }
.cart-product { display: flex; align-items: center; gap: 12px; }
.cart-product img { width: 56px; height: 56px; object-fit: contain; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.cart input[type=number] { width: 80px; }
.cart-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 20px; }
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.checkout .form { margin-top: 0; }
.checkout h2 { font-size: 1.3rem; }
.summary { position: sticky; top: 96px; }
.choice.pay { margin-bottom: 8px; }
.choice.pay small { color: var(--muted); }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } .summary { position: static; } }

/* Formulaires */
.form { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-top: 24px; }
.field { margin-bottom: 16px; border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field label.check, .field label.choice { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.req { color: var(--accent); }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=date], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--line) 70%, var(--ink)); border-radius: 8px; background: var(--white); color: var(--ink);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: .9rem; margin: 4px 0 0; }
.hint { color: var(--muted); font-size: .9rem; margin-top: -8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.toolbar select { width: auto; }

/* Pages */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
.services article { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.contact .form { margin-top: 0; }

@media (max-width: 900px) {
  .hero-in, .product, .shop, .steps, .contact, .footer-grid, .services { grid-template-columns: 1fr; }
  .hero-in { padding: 40px 20px; gap: 28px; }
  .filters { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .row2, .choices { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px 12px 14px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles a { padding: 14px; }
}
