/* =========================================================
   300 — CSS — Fondation globale
   Projet : Plaisirs Gourmands
   Scope : global sitewide
   Préfixe : pg-
   Emplacement source : _dev/snippets-source/css/300-css-fondation-globale.css
   Action : CRÉATION
   Dépendances : aucune
   Notes : ce fichier ne doit pas dessiner les blocs métier
========================================================= */

/* =========================================================
   1. Variables globales
========================================================= */

:root {
  --pg-color-bg: #040201;
  --pg-color-surface: rgba(227, 192, 156, 0.02);
  --pg-color-surface-strong: rgba(227, 192, 156, 0.05);
  --pg-color-text: #f5f5db;
  --pg-color-text-muted: #c5c4af;
  --pg-color-accent: #e3c09c;
  --pg-color-accent-strong: #dfba95;
  --pg-color-border: rgba(245, 245, 219, 0.16);
  --pg-color-border-strong: rgba(227, 192, 156, 0.34);
  --pg-color-focus: #e3c09c;

  --pg-font-body: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pg-font-display: "Playfair Display", Georgia, "Times New Roman", serif;

  --pg-text-xs: 0.75rem;
  --pg-text-sm: 0.875rem;
  --pg-text-md: 1rem;
  --pg-text-lg: 1.125rem;
  --pg-text-xl: 1.5rem;
  --pg-text-2xl: 2rem;
  --pg-text-3xl: 2.5rem;

  --pg-line-tight: 1.1;
  --pg-line-body: 1.6;
  --pg-line-loose: 1.75;

  --pg-space-2xs: 0.25rem;
  --pg-space-xs: 0.5rem;
  --pg-space-sm: 0.75rem;
  --pg-space-md: 1rem;
  --pg-space-lg: 1.5rem;
  --pg-space-xl: 2rem;
  --pg-space-2xl: 3rem;
  --pg-space-3xl: 4rem;

  --pg-container-max: 81.25rem;
  --pg-container-narrow: 60rem;
  --pg-container-padding: 1.25rem;

  --pg-radius-sm: 0.125rem;
  --pg-radius-md: 0.25rem;

  --pg-transition-fast: 160ms ease;
  --pg-transition-base: 240ms ease;

  /* À CONFIRMER : les ombres finales doivent rester sobres et propres au bloc si elles deviennent décoratives. */
  --pg-shadow-soft: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.28);
}

/* =========================================================
   2. Reset léger
========================================================= */

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

html {
  min-width: 320px;
  overflow-x: hidden;
  text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* =========================================================
   3. Base HTML / body
========================================================= */

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--pg-color-bg);
  color: var(--pg-color-text);
  font-family: var(--pg-font-body);
  font-size: var(--pg-text-md);
  line-height: var(--pg-line-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.pg-site {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--pg-color-bg);
  color: var(--pg-color-text);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.pg-site a:hover,
.pg-link:hover {
  color: var(--pg-color-accent);
}

/* =========================================================
   4. Typographies globales
========================================================= */

.pg-kicker,
.pg-section__eyebrow {
  color: var(--pg-color-text-muted);
  font-size: var(--pg-text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: var(--pg-line-tight);
  text-transform: uppercase;
}

.pg-title,
.pg-section__title {
  color: var(--pg-color-text);
  font-family: var(--pg-font-display);
  font-size: var(--pg-text-3xl);
  font-weight: 700;
  line-height: var(--pg-line-tight);
}

/* Règle projet : couleur H1 front verrouillée */
.pg-home .pg-home-hero__title,
.pg-sale .pg-sale__title,
.pg-rental .pg-rental__title,
.pg-event .pg-event__title,
.pg-contact .pg-contact__title,
.pg-legal h1,
.pg-legal__title {
  color: #F5F5DB;
}

.pg-text,
.pg-section__text {
  color: var(--pg-color-text-muted);
  font-size: var(--pg-text-md);
  line-height: var(--pg-line-body);
}

.pg-text--small {
  font-size: var(--pg-text-sm);
}

/* =========================================================
   5. Layout global
========================================================= */

.pg-site {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: clip;
}

.pg-container {
  width: min(100% - (var(--pg-container-padding) * 2), var(--pg-container-max));
  max-width: 100%;
  margin-inline: auto;
}

.pg-container--narrow {
  width: min(100% - (var(--pg-container-padding) * 2), var(--pg-container-narrow));
  max-width: 100%;
  margin-inline: auto;
}

.pg-stack {
  display: flex;
  flex-direction: column;
  gap: var(--pg-stack-gap, var(--pg-space-lg));
}

.pg-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pg-cluster-gap, var(--pg-space-md));
  align-items: center;
  min-width: 0;
}

/* =========================================================
   6. Sections génériques
========================================================= */

.pg-section {
  padding-block: var(--pg-section-padding-block, var(--pg-space-3xl));
}

.pg-section__inner {
  width: min(100% - (var(--pg-container-padding) * 2), var(--pg-container-max));
  max-width: 100%;
  margin-inline: auto;
}

.pg-section__header {
  display: grid;
  gap: var(--pg-space-md);
  min-width: 0;
  max-width: var(--pg-container-narrow);
}

/* =========================================================
   7. Boutons génériques
========================================================= */

.pg-button {
  display: inline-flex;
  max-width: 100%;
  min-height: 2.875rem;
  align-items: center;
  justify-content: center;
  gap: var(--pg-space-xs);
  border: 1px solid transparent;
  border-radius: var(--pg-radius-sm);
  padding: 0.875rem 1.125rem;
  color: var(--pg-color-text);
  cursor: pointer;
  font-size: var(--pg-text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition:
    background-color var(--pg-transition-base),
    border-color var(--pg-transition-base),
    color var(--pg-transition-base);
}

.pg-button--primary {
  border-color: var(--pg-color-accent);
  background: var(--pg-color-accent);
  color: var(--pg-color-bg);
}

.pg-button--primary:hover {
  background: transparent;
  color: var(--pg-color-text);
}

.pg-button--secondary {
  border-color: var(--pg-color-border);
  background: transparent;
  color: var(--pg-color-text);
}

.pg-button--secondary:hover {
  border-color: var(--pg-color-accent);
  color: var(--pg-color-accent);
}

/* =========================================================
   8. Médias globaux
========================================================= */

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

.pg-site main,
.pg-site section,
.pg-site article,
.pg-site div {
  min-width: 0;
}

video {
  background-color: var(--pg-color-bg);
}

/* =========================================================
   9. Accessibilité
========================================================= */

:focus-visible {
  outline: 2px solid var(--pg-color-focus);
  outline-offset: 0.2rem;
}

.pg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pg-skip-link {
  position: fixed;
  top: var(--pg-space-md);
  left: var(--pg-space-md);
  z-index: 9999;
  transform: translateY(-150%);
  border: 1px solid var(--pg-color-accent);
  background: var(--pg-color-bg);
  color: var(--pg-color-text);
  padding: var(--pg-space-sm) var(--pg-space-md);
  text-decoration: none;
  transition: transform var(--pg-transition-fast);
}

.pg-skip-link:focus-visible {
  transform: translateY(0);
}

/* =========================================================
   10. Interactions globales PG — focus et tap highlight
========================================================= */

body.pg-shell-active a,
body.pg-shell-active button,
body.pg-shell-active [role="button"],
body.pg-shell-active input,
body.pg-shell-active select,
body.pg-shell-active textarea,
body.pg-shell-active summary,
body.pg-shell-active label {
  -webkit-tap-highlight-color: transparent;
}

body.pg-shell-active a:focus:not(:focus-visible),
body.pg-shell-active button:focus:not(:focus-visible),
body.pg-shell-active [role="button"]:focus:not(:focus-visible),
body.pg-shell-active input:focus:not(:focus-visible),
body.pg-shell-active select:focus:not(:focus-visible),
body.pg-shell-active textarea:focus:not(:focus-visible),
body.pg-shell-active summary:focus:not(:focus-visible),
body.pg-shell-active label:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

body.pg-shell-active a:focus-visible,
body.pg-shell-active button:focus-visible,
body.pg-shell-active [role="button"]:focus-visible,
body.pg-shell-active input:focus-visible,
body.pg-shell-active select:focus-visible,
body.pg-shell-active textarea:focus-visible,
body.pg-shell-active summary:focus-visible,
body.pg-shell-active label:focus-visible {
  outline: 1px solid var(--pg-color-accent);
  outline-offset: 4px;
}

/* =========================================================
   10. Responsive global mobile-first
========================================================= */

@media (min-width: 48rem) {
  :root {
    --pg-container-padding: 2rem;
    --pg-section-padding-block: 5rem;
  }
}

@media (min-width: 64rem) {
  :root {
    --pg-container-padding: 4rem;
    --pg-text-3xl: 3rem;
  }
}

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

/* =========================================================
   11. Notes de maintenance
========================================================= */

/*
  - Ne pas ajouter ici de styles de header, footer, hero, cartes, galerie, viewer 360,
    overlay, panneaux coulissants ou pages spécifiques.
  - Les classes globales doivent rester rares, transverses et préfixées en pg-.
  - Les valeurs issues des maquettes sont utilisées uniquement quand elles sont dominantes.
  - À CONFIRMER : chargement final des polices Montserrat et Playfair Display.
*/
