/* ==========================================================================
   TL Staging — feuille de style complémentaire
   Registre : ad.handmade (R4) · palette Mint Zen · typo DM Serif Display + Lexend
   Le layout passe par Tailwind (Play CDN) ; ce fichier ne porte que ce que
   Tailwind n'exprime pas : grain de lin, tampons, fiches de mission, révélations.
   ========================================================================== */

:root {
  --mint: #e8f5ef;
  --mint-deep: #cfe7dc;
  --verdure: #2a9d8f;
  --encre: #264653;
  --ocre: #e9c46a;
  --papier: #fbfaf6;
  --encre-70: rgba(38, 70, 83, 0.72);
  --encre-45: rgba(38, 70, 83, 0.45);
  --trait: rgba(38, 70, 83, 0.18);
  --display: "DM Serif Display", Georgia, serif;
  --corps: "Lexend", "Segoe UI", sans-serif;
}

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

body {
  font-family: var(--corps);
  background-color: var(--mint);
  color: var(--encre);
  font-weight: 400;
  line-height: 1.7;
  font-size: 16px;
}

/* Grain de lin : matière du sol, très fin, présent partout.
   z-index -1 : le grain reste au-dessus du fond de page et sous tout le contenu.
   Ne pas remettre une règle du type body > * { z-index: 1 } : le header doit
   rester la couche la plus haute de la page, sinon l'image du hero le recouvre. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--encre);
}

::selection {
  background: var(--ocre);
  color: var(--encre);
}

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

/* --- Titres de section --------------------------------------------------- */

.titre-section {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

.titre-section--inverse {
  color: var(--mint);
}

/* --- Etiquette de terrain (petites capitales) ------------------------------ */

.etiquette {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--encre-70);
}

.etiquette--inverse {
  color: rgba(232, 245, 239, 0.7);
}

/* --- Tampon (artefact rare : encre imprimee, bordure imparfaite) ---------- */

.tampon {
  display: inline-block;
  font-family: var(--corps);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--encre);
  border: 1.5px solid currentColor;
  padding: 0.3rem 0.6rem;
  transform: rotate(-1.6deg);
  opacity: 0.82;
  background: transparent;
}

.tampon--ocre {
  color: var(--encre);
  background: var(--ocre);
  border-color: var(--ocre);
  transform: rotate(1.2deg);
}

.tampon--inverse {
  color: var(--mint);
}

/* --- Fiche de mission (carnet de styliste) -------------------------------- */

.fiche {
  border-top: 1px solid var(--trait);
}

.fiche > div {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--trait);
  align-items: baseline;
}

.fiche dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre-45);
  flex: 0 0 42%;
}

.fiche dd {
  margin: 0;
  font-weight: 500;
}

.fiche--inverse {
  border-top-color: rgba(232, 245, 239, 0.22);
}

.fiche--inverse > div {
  border-bottom-color: rgba(232, 245, 239, 0.18);
}

.fiche--inverse dt {
  color: rgba(232, 245, 239, 0.55);
}

.fiche--inverse dd {
  color: var(--mint);
}

/* --- Liens --------------------------------------------------------------- */

.lien-souligne {
  background-image: linear-gradient(var(--ocre), var(--ocre));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 200ms ease;
  padding-bottom: 1px;
}

.lien-souligne:hover,
.lien-souligne:focus-visible {
  background-size: 100% 2px;
}

.lien-externe {
  border-bottom: 1px solid var(--verdure);
  transition: border-color 160ms ease, color 160ms ease;
}

.lien-externe:hover,
.lien-externe:focus-visible {
  color: var(--verdure);
  border-bottom-color: var(--encre);
}

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--corps);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--encre);
  border-radius: 1px;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 160ms ease, color 160ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-ocre {
  background: var(--ocre);
  color: var(--encre);
  box-shadow: 0 2px 0 var(--encre);
}

.btn-ocre:hover,
.btn-ocre:focus-visible {
  box-shadow: 0 4px 0 var(--encre);
}

.btn-filet {
  background: transparent;
  color: var(--encre);
}

.btn-filet:hover,
.btn-filet:focus-visible {
  background: var(--encre);
  color: var(--mint);
}

.btn-inverse {
  background: transparent;
  color: var(--mint);
  border-color: rgba(232, 245, 239, 0.55);
}

.btn-inverse:hover,
.btn-inverse:focus-visible {
  background: var(--mint);
  color: var(--encre);
  border-color: var(--mint);
}

/* --- Navigation ---------------------------------------------------------- */

.nav-lien {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.7rem;
  border-bottom: 1.5px solid transparent;
  transition: border-color 160ms ease;
}

.nav-lien:hover,
.nav-lien:focus-visible {
  border-bottom-color: var(--verdure);
}

.nav-lien[aria-current="page"] {
  border-bottom-color: var(--ocre);
  color: var(--encre);
}

.menu-groupe {
  position: relative;
}

.menu-groupe > button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-bottom: 1.5px solid transparent;
  transition: border-color 160ms ease;
}

.menu-groupe:hover > button,
.menu-groupe:focus-within > button {
  border-bottom-color: var(--verdure);
}

.menu-groupe[data-actif="true"] > button {
  border-bottom-color: var(--ocre);
}

/* Le panneau est collé au bouton (top: 100%) et son cadre est dessine par un
   pseudo-element : l'espace de 0.55rem au-dessus du cadre reste transparent
   mais survolable, donc le pointeur ne traverse jamais de zone morte. */
.menu-panneau {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 17rem;
  padding: 0.55rem 0.5rem 0.5rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  z-index: 60;
}

.menu-panneau::before {
  content: "";
  position: absolute;
  inset: 0.55rem 0 0 0;
  background: var(--papier);
  border: 1px solid var(--trait);
  box-shadow: 0 12px 28px -18px rgba(38, 70, 83, 0.55);
  z-index: 0;
}

.menu-groupe:hover .menu-panneau,
.menu-groupe:focus-within .menu-panneau {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-panneau a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.menu-panneau a:hover,
.menu-panneau a:focus-visible {
  background: var(--mint);
  border-left-color: var(--ocre);
}

.menu-panneau a[aria-current="page"] {
  border-left-color: var(--ocre);
  background: var(--mint);
}

.menu-panneau a span {
  display: block;
  font-size: 0.75rem;
  color: var(--encre-45);
  margin-top: 0.15rem;
}

/* --- Menu mobile --------------------------------------------------------- */

.panneau-mobile {
  background: var(--mint);
  border-top: 1px solid var(--trait);
  max-height: calc(100svh - 108px);
  overflow-y: auto;
}

.panneau-mobile a {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--trait);
  font-size: 0.95rem;
}

.panneau-mobile .sous-menu {
  padding-left: 1rem;
  border-left: 2px solid var(--mint-deep);
  margin-left: 0.15rem;
}

.panneau-mobile .sous-menu a {
  font-size: 0.88rem;
  color: var(--encre-70);
  border-bottom-style: dashed;
}

/* --- Revelation au scroll ------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--delai, 0ms);
}

[data-reveal].est-visible {
  opacity: 1;
  transform: none;
}

/* --- Diptyque avant / apres ---------------------------------------------- */

.diptyque {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--trait);
  border: 1px solid var(--trait);
}

@media (min-width: 768px) {
  .diptyque {
    grid-template-columns: 1fr 1fr;
  }
}

.diptyque figure {
  position: relative;
  margin: 0;
  background: var(--papier);
}

.diptyque figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--encre-70);
  border-top: 1px solid var(--trait);
}

.diptyque .etiquette {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  background: var(--papier);
  padding: 0.25rem 0.55rem;
}

/* --- Tableaux ------------------------------------------------------------ */

.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tableau th {
  text-align: left;
  font-family: var(--corps);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--encre-70);
  padding: 0.85rem 0.9rem;
  border-bottom: 1.5px solid var(--encre);
  vertical-align: bottom;
}

.tableau td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--trait);
  vertical-align: top;
}

.tableau tbody tr:hover {
  background: rgba(207, 231, 220, 0.4);
}

.tableau .montant {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.tableau--inverse th {
  color: rgba(232, 245, 239, 0.6);
  border-bottom-color: rgba(232, 245, 239, 0.4);
}

.tableau--inverse td {
  border-bottom-color: rgba(232, 245, 239, 0.15);
  color: var(--mint);
}

.tableau--inverse tbody tr:hover {
  background: rgba(232, 245, 239, 0.06);
}

/* --- Accordion (FAQ) ----------------------------------------------------- */

.accordion details {
  border-bottom: 1px solid var(--trait);
}

.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.2rem 1.15rem 0;
  position: relative;
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1.35;
  transition: color 160ms ease;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 1.05rem;
  font-family: var(--corps);
  font-size: 1.25rem;
  color: var(--verdure);
  transition: transform 200ms ease;
}

.accordion details[open] summary::after {
  transform: rotate(45deg);
}

.accordion summary:hover {
  color: var(--verdure);
}

.accordion .reponse {
  padding: 0 2rem 1.3rem 0;
  color: var(--encre-70);
  max-width: 68ch;
}

/* --- Formulaire ---------------------------------------------------------- */

.champ {
  display: block;
  margin-bottom: 1.4rem;
}

.champ label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--encre-70);
  margin-bottom: 0.4rem;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--trait);
  padding: 0.6rem 0.1rem;
  font-family: var(--corps);
  font-size: 0.98rem;
  color: var(--encre);
  transition: border-color 160ms ease;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  outline: none;
  border-bottom-color: var(--verdure);
}

.champ input:focus-visible,
.champ select:focus-visible,
.champ textarea:focus-visible {
  outline: 2px solid var(--verdure);
  outline-offset: 2px;
}

.champ textarea {
  resize: vertical;
  min-height: 6rem;
}

.champ--obligatoire label::after {
  content: " *";
  color: var(--verdure);
}

.champ-erreur {
  display: block;
  font-size: 0.78rem;
  color: #9b3a1b;
  margin-top: 0.3rem;
}

/* --- Chiffres ------------------------------------------------------------ */

.chiffre {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.chiffre span {
  display: block;
  font-family: var(--corps);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre-45);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* --- Note marginale ------------------------------------------------------- */

.note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--encre-45);
  border-left: 2px solid var(--mint-deep);
  padding-left: 0.9rem;
}

.note a {
  color: var(--encre);
}

/* --- Filet de signature --------------------------------------------------- */

.filet {
  border: 0;
  border-top: 1px solid var(--trait);
  margin: 0;
}

/* --- Mouvement reduit ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .lien-souligne,
  .menu-panneau,
  .tampon {
    transition: none;
  }
}

/* --- Impression ----------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .bandeau-cta {
    display: none;
  }

  body::before {
    display: none;
  }
}
