/* ==========================================================================
   Belles de Mer — Vitrine d'artiste
   Palette « Côte-Nord » : ivoire sablé, bleu de mer profond, bois flotté
   ========================================================================== */

:root {
  /* Échelle typographique fluide */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Espacement 4px */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.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;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* ------- Mode clair : sable, ivoire, mer profonde ------- */
:root,
[data-theme='light'] {
  --color-bg: #faf8f3;
  --color-surface: #fdfcf9;
  --color-surface-2: #f4f0e8;
  --color-surface-offset: #ede8dd;
  --color-surface-dynamic: #e5dfd2;
  --color-divider: #e2dccf;
  --color-border: #d6cfbf;

  --color-text: #26313a;
  --color-text-muted: #5f6b74;
  --color-text-faint: #a5adb3;
  --color-text-inverse: #f7f5ef;

  --color-primary: #1f5d7a;
  --color-primary-hover: #174a62;
  --color-primary-active: #113a4d;
  --color-primary-highlight: #d5e2e9;

  --color-accent-sand: #a98d5f;

  --shadow-sm: 0 1px 2px oklch(0.3 0.02 240 / 0.07);
  --shadow-md:
    0 1px 2px oklch(0.3 0.02 240 / 0.06), 0 4px 16px oklch(0.3 0.02 240 / 0.07);
  --shadow-lg:
    0 2px 4px oklch(0.3 0.02 240 / 0.08), 0 12px 32px oklch(0.3 0.02 240 / 0.1);
}

/* ------- Mode sombre : mer de nuit ------- */
[data-theme='dark'] {
  --color-bg: #131a1f;
  --color-surface: #182027;
  --color-surface-2: #1d262e;
  --color-surface-offset: #222d36;
  --color-surface-dynamic: #2b3843;
  --color-divider: #243039;
  --color-border: #37444f;

  --color-text: #d4d8d9;
  --color-text-muted: #8b979e;
  --color-text-faint: #5c686f;
  --color-text-inverse: #17222a;

  --color-primary: #6faec9;
  --color-primary-hover: #8dc0d6;
  --color-primary-active: #a9d0e2;
  --color-primary-highlight: #22333f;

  --color-accent-sand: #c4a878;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.32);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #131a1f;
    --color-surface: #182027;
    --color-surface-2: #1d262e;
    --color-surface-offset: #222d36;
    --color-surface-dynamic: #2b3843;
    --color-divider: #243039;
    --color-border: #37444f;
    --color-text: #d4d8d9;
    --color-text-muted: #8b979e;
    --color-text-faint: #5c686f;
    --color-text-inverse: #17222a;
    --color-primary: #6faec9;
    --color-primary-hover: #8dc0d6;
    --color-primary-active: #a9d0e2;
    --color-primary-highlight: #22333f;
    --color-accent-sand: #c4a878;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.32);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.42);
  }
}

/* ==========================================================================
   Structure générale
   ========================================================================== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--wide {
  max-width: var(--content-wide);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.section-intro {
  color: var(--color-text-muted);
  max-width: 58ch;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: calc(-1 * var(--space-24));
  z-index: 100;
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ==========================================================================
   En-tête
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--hidden {
  transform: translateY(-100%);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.brand-mark {
  color: var(--color-primary);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  padding-block: var(--space-2);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.lang-toggle {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding-inline: var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.lang-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }
}

/* ==========================================================================
   Héros
   ========================================================================== */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    oklch(0.18 0.03 240 / 0.78) 0%,
    oklch(0.2 0.03 240 / 0.32) 45%,
    oklch(0.3 0.03 240 / 0.05) 100%
  );
}

.hero-content {
  width: 100%;
  padding-block: clamp(var(--space-12), 9vw, var(--space-24));
  color: #f4f6f5;
}

.hero-locale {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: oklch(0.9 0.02 220);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: var(--text-hero);
  line-height: 1;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 24px oklch(0.15 0.03 240 / 0.45);
}

.hero-tagline {
  font-size: var(--text-lg);
  font-weight: 300;
  max-width: 46ch;
  color: oklch(0.94 0.01 220);
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

[data-theme='dark'] .btn--primary {
  color: #10181d;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.hero .btn--primary {
  background: #f4f6f5;
  color: #1d3644;
}

.hero .btn--primary:hover {
  background: #dfe7e6;
}

.btn--ghost {
  border: 1px solid oklch(1 0 0 / 0.55);
  color: #f4f6f5;
}

.btn--ghost:hover {
  background: oklch(1 0 0 / 0.12);
}

/* ==========================================================================
   Bandeau éditorial
   ========================================================================== */

.manifesto {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-surface);
}

.manifesto blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.35;
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
}

.manifesto cite {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Galerie
   ========================================================================== */

.galerie-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block: var(--space-8) var(--space-8);
}

.galerie-tab {
  padding: var(--space-2) var(--space-5);
  min-height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid oklch(from var(--color-text) l c h / 0.14);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
}

.galerie-tab:hover {
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.3);
}

.galerie-tab:active {
  background: var(--color-surface-offset);
}

.galerie-tab[aria-selected='true'] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}

.galerie-grid {
  columns: 3 280px;
  column-gap: var(--space-4);
}

.galerie-grid.est-vide {
  columns: auto;
  column-gap: 0;
}

.galerie-item {
  break-inside: avoid;
  margin-bottom: var(--space-4);
  border: none;
  padding: 0;
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--color-surface-offset);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.galerie-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.galerie-item img {
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.galerie-item:hover img {
  transform: scale(1.025);
}

.galerie-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px dashed oklch(from var(--color-text) l c h / 0.18);
  border-radius: var(--radius-xl);
}

.galerie-empty svg {
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

.galerie-empty h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.galerie-empty p {
  max-width: 42ch;
}

.galerie-note {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* Visionneuse (lightbox) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: oklch(0.13 0.02 240 / 0.92);
  padding: var(--space-6);
}

.lightbox.est-ouverte {
  display: grid;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-fermer {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: #eef1f0;
  background: oklch(1 0 0 / 0.08);
}

.lightbox-fermer:hover {
  background: oklch(1 0 0 / 0.18);
}

.lightbox-legende {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  color: oklch(0.85 0.01 220);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Atelier
   ========================================================================== */

.atelier {
  background: var(--color-surface-2);
}

.atelier-grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 860px) {
  .atelier-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-16);
  }
}

.atelier-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.atelier-photo img {
  width: 100%;
  object-fit: cover;
}

.atelier-texte p + p {
  margin-top: var(--space-4);
}

.atelier-texte p {
  color: var(--color-text-muted);
}

.atelier-texte p strong {
  color: var(--color-text);
  font-weight: 600;
}

.atelier-signature {
  margin-top: var(--space-6);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text);
}

/* Pleine largeur — plage */
.plage-bandeau {
  position: relative;
  height: clamp(280px, 46vw, 460px);
  overflow: hidden;
}

.plage-bandeau img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plage-bandeau figcaption {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  color: #f4f6f5;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px oklch(0.2 0.03 240 / 0.7);
  white-space: nowrap;
}

/* ==========================================================================
   Points de vente
   ========================================================================== */

.carte-conteneur {
  height: clamp(320px, 48vw, 440px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  box-shadow: var(--shadow-sm);
  margin-block: var(--space-8);
  background: var(--color-surface-offset);
}

#carte {
  height: 100%;
  width: 100%;
}

.leaflet-container {
  font-family: var(--font-body);
}

.boutiques-grille {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.boutique {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.09);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
}

.boutique--atelier {
  background: var(--color-primary-highlight);
  border-color: transparent;
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.boutique-ville {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.boutique-adresse {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
}

.boutique h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}

.boutique p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.boutique-lien {
  margin-top: auto;
  padding-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
}

.boutique-lien:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.boutique--atelier .boutique-lien {
  margin-top: 0;
  padding-top: 0;
}

/* ==========================================================================
   Pied de page
   ========================================================================== */

.footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding-block: var(--space-16) var(--space-10);
}

[data-theme='dark'] .footer {
  background: var(--color-surface);
  color: var(--color-text);
  border-top: 1px solid var(--color-divider);
}

.footer-inner {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: var(--space-10);
  }
}

.footer-logo img {
  display: block;
  width: 148px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.footer-marque {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-marque .brand-name {
  font-size: var(--text-lg);
}

.footer-baseline {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  opacity: 0.75;
  max-width: 44ch;
}

.footer-liens {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.footer-liens a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-liens a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-mention {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid oklch(1 0 0 / 0.14);
  font-size: var(--text-xs);
  opacity: 0.6;
}

/* ==========================================================================
   Apparitions au défilement
   ========================================================================== */

.reveal {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.est-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
  }
}
