/* miroir.css : layout of the miroir-deco theme, direction A « Reflet ».
   Ported from atelier-design/directions/miroir-deco/accueil/a/style.css. Components rendered by the
   miroir-deco-core blocks (mirror, families, cards, palindromes) carry their own styles in the plugin. */

:root {
  --blanc: #FFFFFF;
  --coquille: #F1DED0;
  --coquille-clair: #F9F0EA;
  --tomate: #D8432F;
  --tomate-txt: #B02A22;
  --tomate-fonce: #8F1F18;
  --encre: #1A1615;
  --gris: #5E5652;
  --filet: #E7D7CB;
  --argent: linear-gradient(100deg, #A9ACB4 0%, #F4F5F7 28%, #9EA1A9 52%, #E8E9EC 72%, #B8BBC2 100%);
  --argent-texte: linear-gradient(100deg, #7F838C 0%, #C4C7CD 28%, #737781 52%, #B3B6BD 74%, #868A93 100%);
  --titre: "Syne", "Arial Black", sans-serif;
  --texte: "Instrument Sans", system-ui, sans-serif;
  --page: 1360px;
  --marge: clamp(16px, 4vw, 56px);
  --focus: 0 0 0 3px var(--blanc), 0 0 0 5px var(--encre);
  --ease: cubic-bezier(.65, 0, .35, 1);
  --bandeau-h: 34px;
  --ico-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='3.5' y='6.5' width='17' height='12' rx='1.5'/%3E%3Ccircle cx='12' cy='12.5' r='3.4'/%3E%3Cpath d='M9 6.5l1.2-2h3.6l1.2 2'/%3E%3C/svg%3E");
  --ico-ecrit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='2.8' y='8.5' width='18.4' height='7' rx='1'/%3E%3Cpath d='M6.5 8.5v3M10 8.5v2M12 8.5v3.5M14 8.5v2M17.5 8.5v3'/%3E%3C/svg%3E");
  --ico-casse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M12 3l7.5 3v5.5c0 4.6-3.2 8-7.5 9.5-4.3-1.5-7.5-4.9-7.5-9.5V6z'/%3E%3Cpath d='M8.6 12.2l2.4 2.4 4.4-4.8'/%3E%3C/svg%3E");
  --ico-paiement: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='3' y='6' width='18' height='12.5' rx='1.6'/%3E%3Cpath d='M3 10h18M6.5 15h3M14.5 15h3'/%3E%3C/svg%3E");
  --ico-francais: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M4 5.5h16v10H13l-5 4v-4H4z'/%3E%3Cpath d='M8.5 10.5h7'/%3E%3C/svg%3E");
  --ico-loupe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E5652' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E");
}

:where(.bandeau, .entete, .md-accueil, .pied), :where(.bandeau, .entete, .md-accueil, .pied) :where(*, *::before, *::after) { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The parts and the home sections set their own spacing: no flow margins inside them. */
.wp-site-blocks > * + * { margin-block-start: 0; }
:root :where(.bandeau.is-layout-flow, .bandeau .is-layout-flow, .entete.is-layout-flow, .entete .is-layout-flow, .md-accueil.is-layout-flow, .md-accueil .is-layout-flow, .pied.is-layout-flow, .pied .is-layout-flow) > * { margin-block: 0; }
:where(.bandeau, .entete, .md-accueil, .pied) :where(h1, h2, h3, p, ul, figure) { margin: 0; }
:where(.md-accueil, .pied, .entete) a { color: inherit; }
:where(.md-accueil, .pied) :where(ul.wp-block-list) { list-style: none; padding: 0; }
.md-accueil section[id] { scroll-margin-top: 130px; }

/* Word carrying its reflection (format « Reflet » in the editor: span.md-reflet, data-reflet added on render). */
.md-reflet { display: inline-grid; }
.md-reflet::after {
  content: attr(data-reflet);
  display: flex; align-items: flex-end; height: .5em; overflow: hidden; margin-top: .04em;
  transform: scaleY(-1);
  background: var(--argent-texte); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.95), rgba(0,0,0,0) 85%);
  mask-image: linear-gradient(to top, rgba(0,0,0,.95), rgba(0,0,0,0) 85%);
}

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  transition: background-color .3s, color .3s, border-color .3s;
}
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(:hover) {
  border: 1.5px solid var(--encre); color: var(--encre); background: transparent; padding: 0 22px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.lien-fleche {
  font-weight: 600; text-decoration: none; white-space: nowrap; color: inherit;
  display: inline-flex; align-items: center; min-height: 44px; gap: 6px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1.5px; background-repeat: no-repeat; background-position: 0 calc(50% + 12px);
}
.lien-fleche::after { content: "→"; }
a.lien-fleche:hover { color: var(--tomate-txt); }

/* ---------- Header: thin promise band scrolls away, the rest stays ---------- */
.wp-block-template-part:has(> .entete), header.wp-block-template-part:has(.entete) {
  position: sticky; z-index: 40;
  top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--bandeau-h));
}
.bandeau { background: var(--encre); color: var(--coquille); }
.bandeau-txt {
  max-width: var(--page); margin: 0 auto; padding: 0 var(--marge); height: var(--bandeau-h);
  display: flex; justify-content: center; align-items: center; gap: 36px;
  font-size: 13px; font-weight: 500; letter-spacing: .01em; line-height: 1.5;
}
.bandeau .bandeau-item { display: inline-flex; align-items: center; gap: 10px; }
.bandeau-plus::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--argent); }

.entete { background: var(--blanc); border-bottom: 1px solid var(--filet); }
.entete-ligne {
  max-width: var(--page); margin: 0 auto; padding: 0 var(--marge);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  height: 76px;
}

.logo-titre { margin: 0; line-height: 1; }
.logo {
  position: relative; display: inline-grid; justify-items: start; text-decoration: none;
  height: 58px; padding-top: 4px; overflow: hidden; color: var(--encre);
}
.logo-mot, .logo-reflet { font: 800 27px/1 var(--titre); letter-spacing: -0.02em; white-space: nowrap; text-transform: lowercase; }
.logo-mot { color: var(--encre); }
.logo-axe { display: block; width: 100%; height: 1.5px; margin: 3px 0 2px; background: var(--argent); }
.logo-reflet {
  transform: scaleY(-1);
  background: var(--argent-texte); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 72%);
  mask-image: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 72%);
}

.wp-block-search.recherche { position: relative; display: flex; align-items: center; max-width: 520px; width: 100%; justify-self: center; margin: 0; }
.recherche .wp-block-search__inside-wrapper { width: 100%; border: 0; padding: 0; background: none; }
.recherche .wp-block-search__input {
  width: 100%; height: 48px; padding: 0 18px 0 46px; margin: 0;
  border: 1.5px solid var(--filet); border-radius: 999px;
  background: var(--coquille-clair) var(--ico-loupe) no-repeat 16px 50% / 20px 20px;
  font: 400 15px/1 var(--texte); color: var(--encre);
}
.recherche .wp-block-search__input::placeholder { color: var(--gris); opacity: 1; }
.recherche .wp-block-search__input:focus-visible { box-shadow: none; outline: none; border-color: var(--encre); background-color: var(--blanc); }

.entete-actions { display: flex; align-items: center; gap: 6px; }
.icone-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 10px; justify-content: center;
  background: none; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  font: 500 14px/1.5 var(--texte); color: var(--encre);
}
.icone-btn:hover { background: var(--coquille-clair); }
.icone-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--encre); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* WooCommerce mini-cart restyled as the mockup's « Panier » button. */
.md-panier .wc-block-mini-cart__button {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 10px;
  border-radius: 999px; font: 500 14px/1.5 var(--texte); color: var(--encre); background: none;
}
.md-panier .wc-block-mini-cart__button::after { content: "Panier"; }
.md-panier .wc-block-mini-cart__button:hover { background: var(--coquille-clair); opacity: 1; }
.md-panier .wc-block-mini-cart__quantity-badge { position: static; }
.md-panier .wc-block-mini-cart__icon { width: 24px; height: 24px; color: var(--encre); }
.md-panier .wc-block-mini-cart__amount { display: none; }
.md-panier .wc-block-mini-cart__badge {
  position: absolute !important; top: 4px !important; left: 26px !important; right: auto !important; margin: 0 !important; transform: none !important;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; border: 0;
  background: var(--encre) !important; color: var(--blanc) !important;
  font: 700 11px/19px var(--texte); text-align: center; box-sizing: border-box;
}
.md-panier .wc-block-mini-cart__badge[hidden] { display: none; }

/* ---------- Generic section head ---------- */
.tete { display: flex; align-items: flex-end; gap: 16px 28px; margin-bottom: 30px; flex-wrap: wrap; }
.md-accueil .tete { margin-bottom: 30px; }
.tete h2, .md-accueil h2 { font: 700 clamp(28px, 3.2vw, 44px)/1.02 var(--titre); letter-spacing: -0.01em; }
.tete-lien { margin-left: auto; }
.tete-etiquette { color: var(--gris); font-size: 15px; padding-bottom: 4px; max-width: 46em; }
.tete-hash { font: 700 clamp(20px, 2vw, 26px)/1 var(--titre); color: var(--tomate-txt); padding-bottom: 6px; }
.tete .wp-block-buttons { margin-left: auto; }

/* ---------- Hero ---------- */
.heros {
  max-width: var(--page); margin: 0 auto; padding: 28px var(--marge) 56px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center;
}
.heros h1 { font-family: var(--titre); letter-spacing: -0.02em; line-height: 1; font-size: inherit; }
.h1-a { display: block; font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--tomate-txt); margin-bottom: 14px; }
.h1-b { display: block; font-weight: 700; font-size: clamp(40px, 4.25vw, 62px); line-height: 1; }
.h1-b .insec { white-space: nowrap; }
.heros-intro { margin-top: 22px !important; font-size: 18px; line-height: 1.5; color: var(--gris); max-width: 30em; }
.heros-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px !important; }
.heros-promesses { margin-top: 30px !important; display: grid; gap: 12px; border-top: 1px solid var(--filet); padding: 20px 0 0; list-style: none; }
.heros-promesses li { position: relative; padding-left: 38px; min-height: 26px; font-size: 14.5px; color: var(--gris); margin: 0; }
.heros-promesses li.md-ico::before { position: absolute; left: 0; top: 0; }
.heros-promesses strong { color: var(--encre); font-weight: 600; }

/* Pictograms of the promises: span the whole item on the left. */
.md-ico::before {
  content: ""; width: 26px; height: 26px; background: var(--tomate-txt);
  -webkit-mask: var(--md-ico) center / contain no-repeat; mask: var(--md-ico) center / contain no-repeat;
  grid-row: 1 / span 2;
}
.md-ico-photo { --md-ico: var(--ico-photo); }
.md-ico-ecrit { --md-ico: var(--ico-ecrit); }
.md-ico-casse { --md-ico: var(--ico-casse); }
.md-ico-paiement { --md-ico: var(--ico-paiement); }
.md-ico-francais { --md-ico: var(--ico-francais); }

/* ---------- Sections ---------- */
.formes, .selection, .reflets, .guides { max-width: var(--page); margin: 0 auto; padding: 64px var(--marge); }
.formes { padding-top: 40px; border-top: 1px solid var(--filet); }
.selection { padding-top: 40px; }

.promesses {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px;
  margin-top: 56px !important; padding: 26px 0 0; border-top: 1.5px solid transparent;
  border-image: var(--argent) 1;
}
.promesse { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; }
.promesse h3 { font: 600 15.5px/1.3 var(--texte); letter-spacing: 0; }
.promesse p { font-size: 14px; color: var(--gris); margin-top: 3px !important; }
.promesse > h3, .promesse > p { grid-column: 2; }

.noms { background: var(--coquille); }
.noms-dedans { max-width: var(--page); margin: 0 auto; padding: 64px var(--marge); }
.noms .tete-etiquette { color: #4E4643; }

.mur { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; align-items: end; }
.mur .mur-item { position: relative; overflow: hidden; background: var(--coquille); margin: 0; }
.mur .mur-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mur-arche { aspect-ratio: 3 / 4.4; border-radius: 999px 999px 4px 4px; }
.mur-rect { aspect-ratio: 3 / 4; border-radius: 4px; }
.mur-rond { aspect-ratio: 1; border-radius: 50%; }
.mur-pilule { aspect-ratio: 3 / 5; border-radius: 999px; }
.mur .mur-item figcaption, .mur-tag {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0;
  padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.9);
  font-size: 11.5px; font-weight: 600; line-height: 1.5; color: var(--gris); white-space: nowrap;
}
.mur .mur-vous { aspect-ratio: auto; overflow: visible; background: var(--blanc); box-shadow: 0 10px 28px rgba(60,25,15,.2); transform: rotate(-2deg); }
.mur .mur-vous img { height: auto; }
.mur-vous .mur-tag { top: -12px; bottom: auto; color: var(--tomate-txt); background: var(--coquille); }
@media (min-width: 1181px) { .mur:has(.mur-vous) { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.guides { border-top: 1px solid var(--filet); }
.guides-liste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.guide { display: grid; gap: 14px; align-content: start; }
.guide .guide-img { aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; margin: 0; }
.guide .guide-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.guide:hover .guide-img img { transform: scale(1.04); }
.guide h3 { font: 700 19px/1.2 var(--titre); letter-spacing: 0; }
.guide .lien-fleche { font-size: 14.5px; }

/* ---------- Footer ---------- */
.pied { background: var(--encre); color: var(--coquille); overflow: hidden; }
.pied a { color: var(--coquille); text-decoration: none; }
.pied a:hover { text-decoration: underline; color: var(--blanc); }
.pied-haut {
  max-width: var(--page); margin: 0 auto; padding: 56px var(--marge) 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.pied h2 { font: 700 17px/1.2 var(--titre); color: var(--blanc); margin-bottom: 12px !important; letter-spacing: 0; }
.pied-col ul { list-style: none; margin: 0; padding: 0; }
.pied-col li a { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; }
.pied-lettre p { font-size: 15px; max-width: 30em; }
.pied-logo { max-width: var(--page); margin: 0 auto; padding: 24px var(--marge) 0; display: grid; justify-items: start; }
.pied-logo .logo-mot, .pied-logo .logo-reflet { font-size: min(9.2vw, 136px); letter-spacing: -.035em; line-height: .82; }
.pied-logo .logo-mot { color: var(--coquille); }
.pied-logo .logo-reflet { height: .42em; overflow: hidden; display: flex; align-items: flex-end; margin-top: 6px; opacity: .55; }
.pied-bas { max-width: var(--page); margin: 0 auto !important; padding: 14px var(--marge) 26px; font-size: 13px; color: #CDBFB6; border-top: 1px solid #3A3331; }

/* Newsletter form (Hostinger Reach block) in the footer, mockup look. */
.pied-lettre .hostinger-reach-block-subscription-form-wrapper { margin-top: 16px !important; max-width: 460px; padding: 0; background: none; border: 0; }
.pied .pied-lettre .hostinger-reach-block-subscription-form { margin: 0; padding: 0; background: none; border: 0; }
.pied .pied-lettre .hostinger-reach-block-form-fields { display: flex; gap: 8px; align-items: stretch; margin: 0; padding: 0; }
.pied .pied-lettre .hostinger-reach-block-form-field { flex: 1; min-width: 0; margin: 0; }
.pied .pied-lettre .hostinger-reach-block-form-field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pied .pied-lettre input[type="email"] {
  width: 100%; height: 48px; padding: 0 18px; border-radius: 999px; margin: 0;
  border: 1.5px solid #6A615D; background: transparent; color: var(--blanc); font: 400 16px/1 var(--texte);
}
.pied .pied-lettre input[type="email"]::placeholder { color: #BDB1AA; }
.pied .pied-lettre .hostinger-reach-block-submit {
  flex: none; width: auto;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; margin: 0;
  background: var(--coquille) !important; color: var(--encre) !important; font: 600 16px/1 var(--texte);
}
.pied .pied-lettre .hostinger-reach-block-submit:hover { background: var(--blanc) !important; }
.pied .pied-lettre :is(.hostinger-reach-block-subscription-form-message, [class*="message"]) { color: var(--blanc); margin-top: 10px; }

/* ---------- Inner pages (page, single, 404, WooCommerce templates) ---------- */
.md-page { padding-top: 40px; padding-bottom: 72px; }
.md-page h1 { margin-top: 0; }
.md-page .formes-liste { margin-top: 48px; }
.md-page .wp-block-search.recherche { justify-self: start; }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  .heros { grid-template-columns: 1fr; }
  .promesses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mur { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --bandeau-h: 28px; }
  body { font-size: 15.5px; }
  .bandeau-txt { font-size: 12.5px; }
  .bandeau-plus { display: none !important; }
  .entete-ligne { height: 60px; grid-template-columns: 44px 1fr auto; gap: 6px; padding: 0 10px; }
  .logo { height: 46px; justify-self: center; padding-top: 6px; }
  .logo-titre { justify-self: center; }
  .logo-mot, .logo-reflet { font-size: 20px; }
  .icone-txt, .md-panier .wc-block-mini-cart__button::after { display: none; }
  .icone-btn, .md-panier .wc-block-mini-cart__button { padding: 0; }
  .entete .wp-block-search.recherche { display: none; position: absolute; left: 0; right: 0; top: 60px; max-width: none; padding: 8px 12px 10px; background: var(--blanc); border-bottom: 1px solid var(--filet); }
  .recherche .wp-block-search__input { background-position: 28px 50%; }
  .recherche-ouverte .entete .wp-block-search.recherche { display: flex; }

  .heros { padding: 14px var(--marge) 36px; gap: 14px; }
  .h1-a { font-size: 16px; margin-bottom: 6px; }
  .h1-b { font-size: 40px; line-height: 1; }
  .heros-intro { display: none; }
  .heros-cta { margin-top: 0 !important; gap: 8px; }
  .heros-cta .wp-block-button__link, .heros-cta .wp-block-button.is-style-outline > .wp-block-button__link { min-height: 46px; padding: 0 18px; font-size: 15px; }
  .heros-texte { display: contents; }
  .heros-promesses { order: 5; margin-top: 4px !important; }

  .formes, .selection, .reflets, .guides { padding-top: 40px; padding-bottom: 40px; }
  .noms-dedans { padding-top: 44px; padding-bottom: 44px; }
  .md-accueil .tete { margin-bottom: 20px; }
  .promesses { grid-template-columns: 1fr; gap: 16px; margin-top: 36px !important; }
  .mur { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .guides-liste { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .guide h3 { font-size: 16px; }
  .pied-haut { grid-template-columns: 1fr 1fr; padding-top: 40px; }
  .pied-lettre { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
