/* ============================================================
   De Fil En Aiguille by Saya — Design « Doux & Aquarelle »
   Feuille de style partagée v2 — Identité visuelle resserrée
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;1,9..144,400&family=Outfit:wght@300;400;500&family=Caveat:wght@500;600;700&display=swap');

:root {
  /* ── Palette — tons chauds & aquarelle ── */
  --blush:       #F5DDD8;   /* rose poudré chaud */
  --blush-deep:  #D9A89E;   /* rose moyen */
  --rose-ink:    #B5624F;   /* accent principal — brique chaude, CTA */
  --lav:         #E6DDEF;   /* lavande douce */
  --lav-deep:    #B9A8D0;   /* lavande soutenue */
  --peach:       #F8E3CC;   /* pêche chaude */
  --sage:        #D8E0C8;   /* sauge pâle */
  --sage-deep:   #8EA876;   /* sauge soutenu */
  --ink:         #4A3F3C;   /* texte principal — brun chaud */
  --ink-soft:    #8C7B78;   /* texte secondaire */
  --paper:       #FDF9F6;   /* fond — blanc cassé chaud */
  --white:       #fff;

  /* ── Typographie ── */
  --serif: 'Fraunces', Georgia, serif;    /* titres — texture artisanale */
  --sans:  'Outfit', system-ui, sans-serif; /* corps — amical, lisible */
  --hand:  'Caveat', cursive;             /* signature, touches uniques */

  /* ── Rayons de bordure (système unifié) ── */
  --radius-sm:   4px;   /* inputs, petits détails */
  --radius-md:   10px;  /* cards */
  --radius-lg:   16px;  /* cards tissus */
  --radius-pill: 999px; /* tags, badges, filtres */
  --radius-btn:  6px;   /* boutons */

  /* ── Ombres portées ── */
  --shadow-sm:   0 4px 12px -4px rgba(74,63,60,.12);
  --shadow-md:   0 16px 40px -20px rgba(181,98,79,.28);
  --shadow-lg:   0 28px 60px -28px rgba(181,98,79,.38);
  /* aliases legacy */
  --shadow-soft: var(--shadow-md);
  --shadow-card: var(--shadow-lg);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: .01em;
  color: var(--ink);
}

/* ── Utilitaires ── */
.wrap { width: min(1140px, 90vw); margin-inline: auto; }
.hand { font-family: var(--hand); font-weight: 600; color: var(--rose-ink); }
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .4em;
  font-size: .7rem;
  color: var(--lav-deep);
}

/* ── Taches aquarelle ── */
.wc {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
}

/* ── Séparateur façon points de couture ── */
.divider {
  width: 72px;
  height: 8px;
  margin: 1.1rem auto 0;
  background-image: radial-gradient(circle, var(--blush-deep) 2.5px, transparent 2.5px);
  background-size: 14px 8px;
  background-repeat: repeat-x;
  background-position: center;
}

/* ── Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
  padding: .95rem 2rem;
  border-radius: var(--radius-btn);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    background-color .22s ease-out,
    color .22s ease-out,
    border-color .22s ease-out,
    transform .15s ease-out,
    box-shadow .22s ease-out;
}
.btn:active { transform: scale(.97); }

/* CTA principal — contraste affirmé, pas un pastel de plus */
.btn-primary {
  background: var(--rose-ink);
  color: var(--white);
  border-color: var(--rose-ink);
  box-shadow: 0 6px 20px -8px rgba(181,98,79,.5);
}
.btn-primary:hover {
  background: #9E5240;
  border-color: #9E5240;
  box-shadow: 0 8px 26px -8px rgba(181,98,79,.65);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--blush-deep);
}
.btn-ghost:hover {
  background: var(--rose-ink);
  color: var(--white);
  border-color: var(--rose-ink);
  transform: translateY(-1px);
}

/* ── Header / Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253,249,246,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217,168,158,.3);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 0;
  gap: 1rem;
}
.nav-brand { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.12rem;
  letter-spacing: .06em;
  color: var(--ink);
  white-space: nowrap;
}
.nav-brand span {
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--rose-ink);
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  align-items: center;
}

/* Clignotement doux des liens de navigation au survol — effet signature */
@keyframes nav-blink {
  0%   { opacity: 1; }
  25%  { opacity: .40; }
  55%  { opacity: 1; }
  78%  { opacity: .58; }
  100% { opacity: 1; }
}
.nav-links a {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .5rem .52rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--rose-ink);
  animation: nav-blink .6s ease-in-out;
}
.nav-links a.active {
  color: var(--rose-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--blush-deep);
}

.nav-logo-link { display: inline-flex; flex-shrink: 0; }
.nav-logo {
  height: 52px;
  width: auto;
  max-width: 140px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  opacity: .97;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
  transition: .3s;
}

/* ── Sections ── */
section { position: relative; }
.section-pad { padding: clamp(3.5rem,8vw,6rem) 0; overflow: hidden; }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2.4rem,5vw,3.2rem);
}
.section-head .hand { font-size: 1.7rem; display: block; margin-bottom: .2rem; }
.section-head h2 { font-size: clamp(2.2rem,4.5vw,3.2rem); margin-bottom: .7rem; }
.section-head p { color: var(--ink-soft); font-weight: 300; }

/* Page hero — sous-pages */
.page-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(3rem,7vw,5.5rem) 0 clamp(2.4rem,5vw,3.4rem);
}
.page-hero .eyebrow { margin-bottom: 1rem; }
.page-hero h1 { font-size: clamp(2.8rem,6vw,4.4rem); margin-bottom: .6rem; }
.page-hero .hand { display: block; font-size: clamp(2rem,4vw,2.8rem); margin-top: .3rem; }
.page-hero p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 38rem;
  margin: .6rem auto 0;
  font-weight: 300;
}

/* ── Footer ── */
.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(217,168,158,.3);
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}
.footer-brand { margin-bottom: 1rem; }
.footer-brand b { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .06em; color: var(--ink); display: block; }
.footer-brand span { font-family: var(--hand); color: var(--rose-ink); font-size: 1.2rem; }
.footer-col h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .25em; color: var(--lav-deep); margin-bottom: 1rem; font-weight: 400; }
.footer-col a, .footer-col p { display: block; color: var(--ink-soft); font-size: .92rem; margin-bottom: .55rem; font-weight: 300; }
.footer-col a:hover { color: var(--rose-ink); }
.footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(217,168,158,.3);
  color: var(--ink-soft);
  font-size: .82rem;
  letter-spacing: .05em;
  position: relative;
  z-index: 2;
}
.footer-bottom .hand { font-size: 1.5rem; display: block; margin-bottom: .2rem; }

/* ── WhatsApp flottant ── */
.whatsapp-float {
  position: fixed;
  right: clamp(1rem,3vw,1.8rem);
  bottom: clamp(1rem,3vw,1.8rem);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.whatsapp-float .wa-bubble {
  background: var(--white);
  color: var(--ink);
  border-radius: 14px 14px 3px 14px;
  padding: .7rem 1rem;
  max-width: 215px;
  font-size: .82rem;
  line-height: 1.45;
  font-weight: 300;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(217,168,158,.4);
  opacity: 0;
  transform: translateX(10px);
  transition: .4s;
  pointer-events: none;
}
.whatsapp-float:hover .wa-bubble { opacity: 1; transform: none; }
.whatsapp-float .wa-bubble b { color: #1f9f80; font-weight: 600; }
.whatsapp-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(217,168,158,.5);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  transition: transform .3s;
  flex-shrink: 0;
}
.whatsapp-btn:hover { transform: scale(1.06); }
.whatsapp-btn svg { width: 30px; height: 30px; fill: #25994e; }

/* ── Révélation au scroll ── */
.reveal { opacity: 0; transform: translateY(24px); transition: 1s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Séparateur visuel entre catégories et liens globaux dans la nav */
.nav-links li.nav-sep { width: 1px; height: 18px; background: rgba(217,168,158,.5); margin: 0 .3rem; flex-shrink: 0; }
.nav-links li.nav-sep a { display: none; }

/* ── Icône admin (roue crantée) ── */
.nav-links li.nav-admin { margin-left: .5rem; padding-left: .6rem; border-left: 1px solid rgba(217,168,158,.4); display: flex; align-items: center; }
.nav-links li.nav-admin a { display: flex; align-items: center; gap: .35rem; color: rgba(74,63,60,.45); padding: .3rem .25rem; text-transform: none; letter-spacing: 0; line-height: 1; }
.nav-links li.nav-admin a:hover { color: var(--rose-ink); animation: none; }
.nav-links li.nav-admin a:hover .admin-cog { transform: rotate(45deg); }
.admin-cog { transition: transform .3s ease; display: block; flex-shrink: 0; }
.nav-admin-label { display: none; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }

/* ── Nav sliding pill (desktop uniquement) ── */
@media (min-width: 1001px) {
  .nav-links {
    position: relative;
    border: 1.5px solid rgba(181,98,79,.22);
    border-radius: 999px;
    padding: 3px;
    background: rgba(253,249,246,.7);
  }
  .nav-pill {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 999px;
    background: var(--rose-ink);
    opacity: 0;
    transition: left .22s cubic-bezier(.4,0,.2,1), width .22s cubic-bezier(.4,0,.2,1), opacity .18s ease;
    pointer-events: none;
    z-index: 0;
  }
  .nav-pill.no-anim { transition: none !important; }
  .nav-links > li { position: relative; z-index: 1; }
  .nav-links > li.pill-on > a,
  .nav-links > li.pill-on > a:hover,
  .nav-links > li.pill-on > a.active {
    color: var(--paper) !important;
    animation: none !important;
    text-decoration: none;
    font-weight: 400;
  }
  /* Le séparateur et l'admin restent hors du pill */
  .nav-links li.nav-sep { z-index: 1; }
  .nav-links li.nav-admin { z-index: 1; }
}

/* ── Responsive — burger à 1000px (7 liens) ── */
@media (max-width: 1000px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    padding: 1rem 6vw 1.4rem;
    gap: 0;
    border-bottom: 1px solid rgba(217,168,158,.4);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: .3s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .82rem .5rem; font-size: .8rem; letter-spacing: .1em; }
  .nav-links li.nav-sep { display: none; }
  .nav-links li.nav-admin { margin-left: 0; padding-left: 0; border-left: none; }
  .nav-links li.nav-admin a { padding: .82rem .5rem; color: rgba(74,63,60,.55); }
  .nav-admin-label { display: inline; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Responsive — smartphone 520px ── */
@media (max-width: 520px) {
  .btn { padding: .85rem 1.5rem; font-size: .75rem; }
  .nav-brand b { font-size: .95rem; }
  .nav-brand span { font-size: .88rem; }
  .section-head .hand { font-size: 1.4rem; }
  .page-hero .hand { font-size: clamp(1.5rem,6vw,2rem); }
}

/* ── Appareils tactiles : pas d'animation hover ── */
@media (hover: none) {
  .nav-links a:hover { animation: none; }
}

/* ── Préférence mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .nav-links a:hover { animation: none; color: var(--rose-ink); }
  .btn { transition: none; }
}

/* ============================================================
   PATTERNS TISSU (classes partagées — galerie + accueil)
   ============================================================ */
.p-dots    { background: radial-gradient(circle at center, var(--blush-deep) 24%, transparent 26%) 0 0 / 22px 22px, var(--paper); }
.p-stripes { background: repeating-linear-gradient(90deg, var(--peach) 0 13px, var(--paper) 13px 26px); }
.p-gingham { background:
  repeating-linear-gradient(0deg, rgba(142,168,118,.45) 0 14px, transparent 14px 28px),
  repeating-linear-gradient(90deg, rgba(142,168,118,.45) 0 14px, transparent 14px 28px),
  var(--paper); }
.p-floral  { background:
  radial-gradient(circle at 20% 30%, var(--blush-deep) 6%, transparent 7%),
  radial-gradient(circle at 60% 60%, var(--rose-ink)   5%, transparent 6%),
  radial-gradient(circle at 80% 20%, var(--sage-deep)  6%, transparent 7%),
  radial-gradient(circle at 35% 80%, var(--lav-deep)   5%, transparent 6%),
  radial-gradient(circle at 50% 45%, var(--peach)      6%, transparent 7%),
  var(--paper);
  background-size: 72px 72px; }
.p-uni     { background: var(--sage); }
.p-uni-rose{ background: var(--blush); }
.p-uni-lav { background: var(--lav); }
.p-leaf    { background:
  radial-gradient(ellipse 9px 4px at 25% 25%, var(--sage-deep) 60%, transparent 62%),
  radial-gradient(ellipse 9px 4px at 70% 55%, var(--sage-deep) 60%, transparent 62%),
  radial-gradient(ellipse 9px 4px at 45% 80%, var(--sage-deep) 60%, transparent 62%),
  var(--paper);
  background-size: 58px 58px; }

/* ============================================================
   CARTES CATÉGORIES — section accueil (cats-home)
   ============================================================ */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1.4rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(217,168,158,.25);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease-out, box-shadow .3s ease-out;
  text-decoration: none;
  color: inherit;
  background: var(--white);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.cat-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 88px 88px;
  gap: 3px;
}
.cat-ph { background: var(--paper); }
.cat-label { padding: 1rem 1.2rem 1.4rem; }
.cat-label h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.cat-label p { font-size: .88rem; color: var(--ink-soft); font-weight: 300; margin-bottom: .4rem; line-height: 1.4; }
.cat-count {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--lav-deep);
  font-family: var(--sans);
}
.cats-cta { text-align: center; margin-top: 2.8rem; }

/* ============================================================
   GALERIE — sections catégorie + cartes modèle
   ============================================================ */

/* Section catégorie */
.cat-section { margin-bottom: clamp(3rem,7vw,5rem); }
.cat-section.hidden { display: none; }
.cat-heading {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--blush-deep);
}
.cat-heading .cat-ic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cat-heading .cat-ic svg { width: 24px; height: 24px; stroke: var(--white); fill: none; stroke-width: 1.5; }
.cat-heading h2 { font-size: clamp(1.8rem,3.5vw,2.4rem); margin: 0; }
.cat-heading .cat-desc { font-size: .92rem; color: var(--ink-soft); font-weight: 300; }

/* Grille des modèles */
.models-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.6rem; }

/* Carte modèle */
.model-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(217,168,158,.25);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease-out, box-shadow .3s ease-out;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.model-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.model-card:hover .model-preview img { transform: scale(1.03); }
.model-preview img { transition: transform .4s ease; }
.model-prix { font-size: .88rem; color: var(--rose-ink); margin-top: .3rem; font-weight: 300; }
.model-prix strong { font-weight: 600; }
.model-preview {
  aspect-ratio: 4/5;
  transition: background-color .2s, background-image .2s;
  position: relative;
}
.model-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.model-body {
  padding: 1.1rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.model-card h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.model-desc { font-size: .9rem; color: var(--ink-soft); font-weight: 300; margin-bottom: .8rem; line-height: 1.5; }

/* Swatches tissu */
.swatches { display: flex; gap: .45rem; margin-bottom: .75rem; flex-wrap: wrap; align-items: center; }
.swatches-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin-right: .2rem; font-family: var(--sans); }
.swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: border-color .18s, transform .15s;
  flex-shrink: 0;
}
.swatch-btn:hover { transform: scale(1.18); }
.swatch-btn.active { border-color: var(--rose-ink); box-shadow: 0 0 0 1px var(--rose-ink); transform: scale(1.08); }

/* Tissu sélectionné */
.model-tissu { font-size: .8rem; color: var(--ink-soft); margin-bottom: .85rem; font-weight: 300; }
.model-tissu b { color: var(--rose-ink); font-weight: 500; }

/* Lien commande */
.model-card .btn-order { margin-top: auto; justify-content: center; width: 100%; }

/* Note galerie */
.gallery-note {
  border: 2px dashed var(--blush-deep);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.6rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 300;
  max-width: 50rem;
  margin: 0 auto 3rem;
}
.gallery-note b { color: var(--rose-ink); font-weight: 600; }

/* Responsive galerie */
@media (max-width: 860px) {
  .cats-grid { grid-template-columns: repeat(2,1fr); }
  .models-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 520px) {
  .cats-grid { grid-template-columns: 1fr; }
  .models-grid { grid-template-columns: 1fr; }
  .cat-previews { grid-template-rows: 70px 70px; }
}
