/* ==========================================================
   WeddingPart – Design System · base.css
   Tokens · Reset · Typographie · Layout · Grid · Sections
   ========================================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; scrollbar-gutter: stable; }
body  { margin: 0; }
img   { max-width: 100%; height: auto; display: block; }
a     { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ==========================================================
   TOKENS
   ========================================================== */
:root {

  /* --- Palette brand --- */
  --wp-brand:          #9E4D64;   /* rose poudré principal (contraste AA : 5,7 sur blanc) */
  --wp-brand-dark:     #853F55;   /* rose profond (hover)       */
  --wp-brand-light:    #EDD6DC;   /* rose pâle (backgrounds)    */
  --wp-brand-soft:     rgba(181,99,122,.09);
  --wp-brand-border:   rgba(181,99,122,.22);

  /* --- Palette gold accent --- */
  --wp-gold:           #C9A87C;   /* champagne / or            */
  --wp-gold-dark:      #836947;   /* lisible sur ivoire (4,5) */
  --wp-gold-light:     #F7EFE3;   /* beige ivoire léger        */
  --wp-gold-border:    rgba(201,168,124,.28);

  /* --- Palette sage accent --- */
  --wp-sage:           #7A9D80;   /* vert sauge                */
  --wp-sage-dark:      #5F8066;
  --wp-sage-light:     #E6EFE7;
  --wp-sage-border:    rgba(122,157,128,.25);

  /* --- États sémantiques (success/warning/danger/info) --- */
  --wp-success:        #059669;
  --wp-success-bg:     rgba(16,185,129,.10);
  --wp-success-border: rgba(16,185,129,.30);
  --wp-success-text:   #065f46;
  --wp-warning:        #F59E0B;
  --wp-warning-bg:     rgba(245,158,11,.10);
  --wp-warning-border: rgba(245,158,11,.30);
  --wp-warning-text:   #92400e;
  --wp-danger:         #EF4444;
  --wp-danger-bg:      rgba(239,68,68,.10);
  --wp-danger-border:  rgba(239,68,68,.30);
  --wp-danger-text:    #991B1B;
  --wp-info:           #3B82F6;
  --wp-info-bg:        rgba(59,130,246,.10);

  /* --- Greys neutres pour UI désactivée/passive --- */
  --wp-grey-50:        #F9FAFB;
  --wp-grey-100:       #F3F4F6;
  --wp-grey-200:       #E5E7EB;
  --wp-grey-300:       #D1D5DB;
  --wp-grey-400:       #9CA3AF;
  --wp-grey-500:       #6B7280;
  --wp-grey-600:       #4B5563;
  --wp-grey-700:       #374151;

  /* --- Neutrals --- */
  --wp-bg:             #FDFAF8;   /* ivoire chaud (fond global) */
  --wp-surface:        #FFFFFF;
  --wp-surface-2:      #FAF5F3;   /* fond carte léger           */
  --wp-surface-3:      #F5EEEc;   /* fond section alternée      */
  --wp-ink:            #1D1819;   /* noir chaud quasi-noir      */
  --wp-soft:           #6E5A60;   /* gris-mauve texte secondaire*/
  --wp-muted:          #7A6A6F;   /* texte discret (contraste AA) */
  --wp-line:           #EDE0E4;   /* bordure par défaut         */
  --wp-line-strong:    #DECFD5;   /* bordure forte              */

  /* --- Typographie --- */
  --font-serif:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:   'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Scale fluideet accessible */
  --text-xs:   .75rem;    /*  12px */
  --text-sm:   .875rem;   /*  14px */
  --text-base: 1rem;      /*  16px */
  --text-lg:   1.125rem;  /*  18px */
  --text-xl:   1.25rem;   /*  20px */
  --text-2xl:  1.5rem;    /*  24px */
  --text-3xl:  1.875rem;  /*  30px */
  --text-4xl:  2.25rem;   /*  36px */
  --text-5xl:  3rem;      /*  48px */
  --text-6xl:  3.75rem;   /*  60px */
  --text-7xl:  4.5rem;    /*  72px */

  /* --- Espacement --- */
  --space-1:   .25rem;
  --space-2:   .5rem;
  --space-3:   .75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* --- Rayon --- */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   22px;
  --radius-xl:   30px;
  --radius-2xl:  40px;
  --radius-full: 9999px;

  /* --- Ombres --- */
  --shadow-xs:  0 1px 4px rgba(29,24,25,.06);
  --shadow-sm:  0 3px 12px rgba(29,24,25,.07);
  --shadow-md:  0 8px 28px rgba(29,24,25,.09);
  --shadow-lg:  0 18px 48px rgba(29,24,25,.11);
  --shadow-xl:  0 32px 72px rgba(29,24,25,.13);
  --shadow-brand: 0 12px 32px rgba(181,99,122,.25);
  --shadow-gold:  0 10px 28px rgba(201,168,124,.22);

  /* --- Layout --- */
  --container:        1160px;
  --container-wide:   1400px;
  --container-narrow: 760px;
  --gutter:           24px;
  --header-h:         68px;      /* hauteur header desktop (cf. header.css .nav min-height) */
  --tap-target:       44px;      /* WCAG 2.5.5 — taille minimale d'une zone tactile */

  /* --- Breakpoints (référence — utiliser via @media directement) ---
     mobile-small : 380px
     mobile       : 480px
     phablet      : 600px
     tablet       : 768px
     small-laptop : 1024px
  */

  /* --- Transitions --- */
  --ease:     cubic-bezier(.4,0,.2,1);
  --duration: 180ms;
  --duration-lg: 280ms;
  --z-header:   100;
  --z-sticky:   200;
  --z-overlay:  9000;
  --z-modal:    9500;
  --z-toast:    9999;
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }   /* aligné avec header.css mobile rule */
}

/* ==========================================================
   BODY & TYPOGRAPHIE DE BASE
   ========================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--wp-ink);
  background-color: var(--wp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Titres — serif élégant */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--wp-ink);
  margin: 0 0 var(--space-4);
  letter-spacing: -.01em;
}

h1 { font-size: clamp(var(--text-3xl), 5.5vw, var(--text-6xl)); font-weight: 700; }
h2 { font-size: clamp(var(--text-2xl), 3.8vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl),  2.8vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
h5 { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
h6 { font-size: var(--text-base); font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }

/* Italique serif pour les accents décoratifs */
em { font-style: italic; }
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--wp-brand);
}

strong { font-weight: 700; }

/* ==========================================================
   LAYOUT
   ========================================================== */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide   { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

/* Gutter responsive : plus serré sur mobile */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
}
@media (max-width: 380px) {
  :root { --gutter: 12px; }
}

/* Site content : espace propre sous le header sticky */
.site-content {
  padding-block: var(--space-8) var(--space-12);
  min-height: 60vh;
}
@media (max-width: 782px) {
  .site-content { padding-block: var(--space-6) var(--space-10); }
}
@media (max-width: 480px) {
  .site-content { padding-block: var(--space-5) var(--space-8); }
}

/* ==========================================================
   GRILLES
   ========================================================== */
.grid   { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ==========================================================
   SECTIONS — espacement vertical cohérent
   ========================================================== */
.section         { padding-block: clamp(var(--space-16), 7vw, var(--space-24)); }
.section--sm     { padding-block: clamp(var(--space-10), 4vw, var(--space-16)); }
.section--lg     { padding-block: clamp(var(--space-20), 9vw, var(--space-32)); }
.section--brand  { background: linear-gradient(135deg, var(--wp-brand) 0%, var(--wp-brand-dark) 100%); color: #fff; }
.section--blush  { background: var(--wp-brand-light); }
.section--ivory  { background: var(--wp-surface-3); }
.section--gold   { background: var(--wp-gold-light); }
.section--dark   { background: var(--wp-ink); color: #fff; }

/* ==========================================================
   PROSE (contenu éditeur WordPress)
   ========================================================== */
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: var(--space-8); }
.prose h2 { font-size: var(--text-2xl); }
.prose h3 { font-size: var(--text-xl); }
.prose p, .prose li { font-size: var(--text-lg); line-height: 1.75; color: var(--wp-soft); }
.prose ul { list-style: disc; padding-left: var(--space-6); }
.prose ol { list-style: decimal; padding-left: var(--space-6); }
.prose li { margin-bottom: var(--space-2); }
.prose a { color: var(--wp-brand); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  border-left: 3px solid var(--wp-brand);
  margin: var(--space-8) 0;
  padding: var(--space-4) var(--space-6);
  background: var(--wp-brand-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--wp-soft);
}
