/*
 * Quentin Danel : feuille de style principale.
 * Principe : aucune couleur d'interface. Noir, blanc et gris ; les photos apportent la couleur.
 */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #6b6b6b;
  --line: #e4e4e4;

  --font: "Outfit", system-ui, sans-serif;
  --weight-text: 300;
  --weight-title: 700;

  /* Échelle généreuse : Quentin trouve les références trop petites */
  --text: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --small: 0.9375rem;
  --label: 0.875rem;
  --h1: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --h2: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --h3: 1.25rem;
  --tracking-caps: 0.12em;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 42rem;
  --wide: 90rem;
  --space: clamp(3rem, 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text);
  font-weight: var(--weight-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: var(--weight-title);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }

p { margin: 0 0 1.2em; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.75em 1em;
  background: var(--ink);
  color: var(--paper);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Mise en page */

.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding: var(--space) var(--gutter); }
.prose { max-width: var(--measure); }

/* En-tête. Mobile et tablette : nom à gauche, panier et hamburger à droite, rubriques en plein écran à l'ouverture.
   À partir de 80rem : nom au centre, rubriques toujours visibles de part et d'autre, sans menu déroulant. */

.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding: 1rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
/* Montagne du logo de Quentin au-dessus du nom, à la largeur du nom. */
.site-brand__mark { display: block; width: 0; min-width: 100%; margin-bottom: 0.35rem; }  /* n'élargit pas le bloc : prend la largeur du nom */
.site-brand__mark svg { display: block; width: 100%; height: auto; }
.site-brand__name {
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: var(--weight-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.site-brand__tagline {
  margin-top: 0.3em;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--muted);
}

.site-actions { display: flex; align-items: center; gap: 1.25rem; }

.site-menu-toggle,
.site-menu-toggle:hover {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.625rem;   /* zone tactile de 44 px, barres alignées sur la marge */
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
}

/* Hamburger à deux barres ; à l'ouverture, les barres pivotent pour former une croix */
.burger { position: relative; display: block; width: 1.5rem; height: 0.5rem; }
.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.burger span:first-child { top: 0; }
.burger span:last-child { top: calc(100% - 1.5px); }
.menu-open .burger span { top: calc(50% - 0.75px); }
.menu-open .burger span:first-child { transform: rotate(45deg); }
.menu-open .burger span:last-child { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .burger span { transition: none; } }

.site-nav { display: none; }
.menu-open { overflow: hidden; }
.menu-open .site-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: fixed;
  inset: 0;
  z-index: -1;
  padding: 7rem var(--gutter) 2rem;
  overflow-y: auto;
  background: var(--paper);
}
/* Barre d'administration (compte connecté) : elle décale l'en-tête, le panneau descend d'autant. */
.menu-open .admin-bar .site-nav { padding-top: calc(7rem + 46px); }
@media (min-width: 783px) { .menu-open .admin-bar .site-nav { padding-top: calc(7rem + 32px); } }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list a {
  font-size: 1.75rem;
  font-weight: var(--weight-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_parent > a { text-decoration: underline; }
.site-nav__cart { display: none; }

@media (min-width: 80rem) {
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 1.75rem var(--gutter); }
  .site-brand { grid-column: 2; grid-row: 1; align-items: center; text-align: center; }
  .site-brand__name { font-size: 1.5rem; }
  .site-brand__tagline { font-size: var(--label); }
  .site-actions { display: none; }
  .site-nav,
  .menu-open .site-nav { display: contents; }
  .site-nav__list { flex-direction: row; flex-wrap: nowrap; gap: clamp(1.25rem, 2vw, 2rem); white-space: nowrap; }
  .site-nav__list--left { grid-column: 1; grid-row: 1; }
  .site-nav__list--right { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .site-nav__list a { font-size: 1rem; font-weight: 400; letter-spacing: var(--tracking-caps); }
  .site-nav__list a:hover { text-decoration: underline; }
  .site-nav__cart { display: list-item; }
}

/* Pied de page */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: var(--space) var(--gutter) 2.5rem;
  font-size: var(--small);
  color: var(--muted);
}
.site-footer__social {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__social a {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  text-decoration: none;
}
.site-footer__social a:hover { text-decoration: underline; }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__legal a { display: inline-block; padding: 0.6rem 0; color: inherit; }
.site-footer__legal a:hover { color: var(--ink); }
.site-footer__copy { margin: 0; }

/* Textes légaux : encadrés imposés (garanties, formulaire de rétractation) et récapitulatif avant confirmation */
.encadre { margin: 1.5rem 0; padding: 1.25rem 1.5rem; border: 1px solid var(--ink); }
.encadre > p:first-child { margin-top: 0; }
.encadre > p:last-child { margin-bottom: 0; }
.recap__title { font-size: var(--h3); }
.recap { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; margin: 0 0 1.5rem; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; }

/* Boutons et formulaires (y compris ceux de WooCommerce) */

.button, button, input[type="submit"], .wp-element-button {
  display: inline-block;
  padding: 1em 2em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: var(--label);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:hover, input[type="submit"]:hover, .wp-element-button:hover { background: var(--paper); color: var(--ink); }
.button:disabled, button:disabled { opacity: 0.4; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  padding: 0.8em 0.9em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
label { font-size: var(--label); text-transform: uppercase; letter-spacing: var(--tracking-caps); }

/* Lien panier (affiché dès qu'il contient un tirage) */

.site-cart {
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

/* Contact : coordonnées puis formulaire ; côte à côte sur grand écran. */

.contact__grid { display: grid; gap: 2.5rem; }
.field { display: grid; gap: 0.4rem; margin: 0 0 1.25rem; padding: 0; border: 0; }
.field legend { margin-bottom: 0.4rem; padding: 0; font-size: var(--label); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.field__optional { color: var(--muted); text-transform: none; letter-spacing: 0; }
.field__error { font-size: var(--small); font-weight: 400; }
.field--error input, .field--error textarea { border-width: 2px; }
.field--trap { position: absolute; left: -10000px; }
.choice-line { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; font-size: 1rem; text-transform: none; letter-spacing: 0; cursor: pointer; }
.choice-line input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--ink); }
input, textarea { font-size: 1rem; }  /* 16 px : pas de zoom automatique sur iPhone */
.contact__privacy { color: var(--muted); font-size: var(--small); }
.notice { padding: 1rem 1.25rem; border: 1px solid var(--ink); }
.notice--error { border-width: 2px; }

@media (min-width: 64rem) {
  .contact__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); }
}

/* Mosaïque (pêle-mêle de l'accueil, galeries des pages) : maçonnerie en colonnes CSS, photos entières, interstice fin. */
.mosaic {
  columns: 2;
  column-gap: 0.375rem;
  margin: 0;
  padding: 0 0.375rem;
  list-style: none;
}
.mosaic li { break-inside: avoid; margin-bottom: 0.375rem; }
.mosaic a { display: block; }
.mosaic img { width: 100%; height: auto; transition: opacity 0.2s; }
.mosaic a:hover img { opacity: 0.85; }
@media (min-width: 48rem) {
  .mosaic { columns: 3; column-gap: 0.75rem; padding: 0 var(--gutter); }
  .mosaic li { margin-bottom: 0.75rem; }
}
@media (min-width: 80rem) {
  .mosaic { columns: 4; }
}

/* Page standard : texte puis galerie */
.page__text { padding-bottom: 2rem; }
.page .mosaic { margin-bottom: var(--space); }
