/* ============================================================
   POSETOUJOURS — site-FINAL.css
   CSS UNIFIÉ : Site commercial + Galeries photos
   
   VERSION FINALE : Merge site.css + améliorations 2024-03
   - Corrections audit (gaps, fonts, vh)
   - Palette enrichie (couleurs dessins)
   - Classes dégradés (15 classes)
   - Contexte galeries (body.context-gallery)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500&display=swap');

/* ════════════════════════════════════════════════════════════
   1. FONDATIONS
   ════════════════════════════════════════════════════════════ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  /* ═══ PALETTE 2024-03 ═══
     Évolution douce : garde base actuelle + enrichit avec couleurs dessins
     ═══════════════════════ */
  
  /* Fond */
  --bg: #fafafa;              /* Gris neutre (inchangé) */
  --bg-card: #ffffff;         /* Blanc pur (inchangé) */
  --bg-hover: #f0f0f0;        /* Gris hover (inchangé) */
  --bg-warm: #F7EBF2;         /* NEW: Rose pâle dessins (sections chaudes) */
  --bg-cool: #F5F7F6;         /* NEW: Vert d'eau palette 2 (sections fraîches) */

  /* Texte */
  --text: #1a1a1a;            /* Quasi noir (inchangé) */
  --text-muted: #5a5a5a;      /* Gris moyen (inchangé) */
  --text-light: #888888;      /* Gris clair (inchangé) */

  /* Accent */
  --accent: #3d5a50;          /* Vert sauge principal (inchangé) */
  --accent-hover: #43524B;    /* NEW: Vert foncé dessins (plus profond) */
  --accent-warm: #EE7D4A;     /* NEW: Orange corail dessins (CTA chaleureux) */
  --accent-secondary: #C089A9; /* NEW: Rose ancien dessins (touches douces) */

  /* Bordures */
  --border: #e0e0e0;          /* Gris bordure (inchangé) */
  --border-hover: #c0c0c0;    /* Gris hover (inchangé) */

  /* Typographie */
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;

  /* Dimensions */
  --max-width: 960px;
  --max-width-text: 640px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-soft: 8px;

  /* Effets */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition: 150ms ease;
  --transition-slow: 250ms ease;

  /* Safe area */
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Icônes statut (CSS only) */
  --icon-private: "●";
  --icon-circle: "◐";
  --icon-public: "○";

  /* Couleurs statut */
  --status-private: #3a3a3a;
  --status-circle: #6b645b;
  --status-public: var(--accent);

  /* Alias compatibilité galerie (photos-v2) */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-card);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --border-color: var(--border);
  --transition-fast: var(--transition);
  --transition-smooth: var(--transition-slow);
  --shadow-soft: var(--shadow);
  --shadow-medium: var(--shadow-hover);
  --safe-area-bottom: var(--safe-bottom);
}

/* ═══ DÉGRADÉS 2024-03 ═══
   Classes utilitaires pour fonds dégradés (site vitrine)
   Usage: <section class="gradient-[nom]">
   ═══════════════════════ */

/* ── DÉGRADÉS DOUX (sections principales) ─────────────────── */

.gradient-welcome {
  background: linear-gradient(135deg, var(--bg-cool) 0%, var(--bg-warm) 100%);
}

.gradient-warm {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-warm) 100%);
}

.gradient-cool {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-cool) 100%);
}

.gradient-warm-to-cool {
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-cool) 100%);
}

.gradient-neutral-soft {
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 100%);
}

/* ── DÉGRADÉS ACCENT (CTA / sections fortes) ──────────────── */

.gradient-accent-strong {
  background: linear-gradient(45deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #ffffff;
}

.gradient-accent-strong h1,
.gradient-accent-strong h2,
.gradient-accent-strong h3,
.gradient-accent-strong p {
  color: #ffffff;
}

.gradient-warm-cta {
  background: linear-gradient(135deg, var(--accent-warm) 0%, #BE6016 100%);
  color: #ffffff;
}

.gradient-warm-cta h1,
.gradient-warm-cta h2,
.gradient-warm-cta h3,
.gradient-warm-cta p {
  color: #ffffff;
}

/* ── DÉGRADÉS SUBTILS (alternance sections) ───────────────── */

.gradient-rose-pale {
  background: linear-gradient(180deg, #fafafa 0%, var(--bg-warm) 100%);
}

.gradient-vert-pale {
  background: linear-gradient(180deg, #fafafa 0%, var(--bg-cool) 100%);
}

.gradient-horizon {
  background: linear-gradient(90deg, var(--bg-cool) 0%, #ffffff 50%, var(--bg-warm) 100%);
}

/* ── CLASSES UTILITAIRES DÉGRADÉS ─────────────────────────── */

/* Pour cards/blocs avec fond dégradé rose */
.card-gradient-warm {
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-warm) 100%);
  border-color: var(--accent-secondary);
}

/* Pour cards/blocs avec fond dégradé vert */
.card-gradient-cool {
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-cool) 100%);
  border-color: var(--accent);
}

/* Overlay dégradé (pour placement sur images) */
.overlay-gradient-dark {
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
}

.overlay-gradient-accent {
  background: linear-gradient(180deg, rgba(61,90,80,0) 0%, rgba(61,90,80,0.8) 100%);
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ──────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ── TYPOGRAPHIE ───────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.2rem); }

p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

.label {
  font-family: var(--font-mono);
  /* ═══ AUDIT 2024-03 ═══
     OLD: font-size: 0.75rem
     NEW: font-size: 0.8rem
     WHY: Meilleure lisibilité sur écrans haute résolution
     ═══════════════════════ */
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   2. COMPOSANTS GLOBAUX
   ════════════════════════════════════════════════════════════ */

/* ── BOUTONS ───────────────────────────────────────────────── */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: 
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.btn-primary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-hover);
}

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

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ── BOUTONS CONTRÔLE ANIMATIONS (classe commune) ──────────── */
.btn-animation-control {
  position: absolute;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  backdrop-filter: blur(4px);
}

.btn-animation-control:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}

.btn-animation-control:active {
  transform: scale(0.98);
}

/* Variantes de position */
.btn-animation-control.top-right {
  top: 0.75rem;
  right: 0.75rem;
}

.btn-animation-control.top-left {
  top: 0.75rem;
  left: 0.75rem;
}

/* Variante ronde (pour bandes défilantes) */
.btn-animation-control.round {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.2rem;
}

/* Fallback : si jamais le bouton n'est pas dans le bon parent */
.bloc-img {
  position: relative;
}

/* Les vrais parents (prioritaires) */
.flash-portraits-container,
.bandes-carousel-container,
.bandes-container {
  position: relative;
}

/* Desktop : apparaît au hover du conteneur parent */
@media (min-width: 768px) {
  .btn-animation-control.hide-on-desktop {
    opacity: 0;
  }
  
  /* Révéler au hover du parent */
  .flash-portraits-container:hover .btn-animation-control,
  .bandes-carousel-container:hover .btn-animation-control,
  .bandes-container:hover .btn-animation-control {
    opacity: 1;
  }
}

/* Mobile : toujours visible */
@media (max-width: 767px) {
  .btn-animation-control {
    opacity: 1 !important;
  }
}


/* ── CARTES ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: 
    box-shadow var(--transition-slow),
    border-color var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.card-img {
  aspect-ratio: 4 / 3;
  background: var(--bg-hover);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.card:hover .card-img img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  margin-bottom: 0.25rem;
}

.card-body .label {
  display: block;
  margin-bottom: 0.5rem;
}

/* ── IMAGES ────────────────────────────────────────────────── */
.img-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-hover);
}

.img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 
    transform var(--transition-slow),
    filter var(--transition-slow);
}

.img-wrap:hover img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-hover) 0%, var(--border) 100%);
}

/* ── LISTES ────────────────────────────────────────────────── */
.list-bare {
  list-style: none;
}

.list-bare li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.list-bare li::before {
  content: '–';
  color: var(--text-light);
  flex-shrink: 0;
}

/* ── FORMULAIRES ───────────────────────────────────────────── */
input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── MODALS (base commune) ─────────────────────────────────── */
.modal-overlay,
.info-modal,
.welcome-modal,
.confirm-modal,
.status-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay { z-index: 1000; }
.status-menu { z-index: 2000; align-items: flex-end; }
.welcome-modal { z-index: 3000; }
.confirm-modal, .info-modal { z-index: 3500; }

.modal-box,
.info-modal-content,
.welcome-modal-content,
.confirm-modal-content {
  background: var(--bg-card);
  width: 100%;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box {
  max-width: 480px;
  max-height: 85vh;
}

/* Bouton fermer modal */
.modal-close,
.close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover,
.close-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* Checkbox dans modals */
.modal-checkbox,
.welcome-checkbox,
.confirm-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.modal-checkbox input[type="checkbox"],
.welcome-checkbox input[type="checkbox"],
.confirm-checkbox input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── TOAST ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(1.5rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── ÉTATS ─────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}

.loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   3. LAYOUT SITE VITRINE
   ════════════════════════════════════════════════════════════ */

/* ── CONTAINERS ────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-text {
  max-width: var(--max-width-text);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

/* ── NAVIGATION ────────────────────────────────────────────── */
.site-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── FOOTER SITE ───────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  padding-bottom: calc(1rem + var(--safe-bottom));
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a,
.footer-links button,
.footer-link-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  transition: color var(--transition), background var(--transition);
}

.footer-links a:hover,
.footer-links button:hover,
.footer-link-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.footer-sep {
  color: var(--border);
  font-size: 0.75rem;
}

/* ── GRILLES ───────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns:1fr 1fr;
  grid-template-areas: "img1 text";
  gap: 4rem;
  align-items: start;
}

.hero-img1 {
  grid-area: img1;
  width: 100%;
}

.hero-img1 .img-wrap {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-img1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img2 {
  grid-area: img2;
  align-self: start;
  max-width: 100px;
  height: 60%;
  max-height: 60%;
}

.hero-img2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-lg);
}

.hero-text {
  grid-area: text;
  align-self: start;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1rem;
}

.tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── BLOCS PRESTATIONS ─────────────────────────────────────── */
.bloc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.bloc-grid.reverse .bloc-img {
  order: 2;
}

.bloc-img .img-wrap {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-hover);
}

.bloc-img .img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-hover) 0%, var(--border) 100%);
}

.bloc-text h2 {
  margin: 0.5rem 0;
}

.bloc-content {
  margin: 1rem 0;
}

.bloc-content p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.closing {
  font-style: italic;
  color: var(--text-muted);
  margin-top: 1rem;
}


/* ════════════════════════════════════════════════════════════
   BANDES DÉFILANTES (Bloc "Les bandes photos")
   ════════════════════════════════════════════════════════════ */

.bandes-container {
  position: relative; /* ← Parent du bouton */
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--radius-lg);
}

.bandes-stage {
  position: relative; /* ← Parent des bandes */
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bande {
  position: absolute;
  top: 100%; /* démarre en bas */
  display: flex;
  flex-direction: column;
  gap: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25))
          drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  will-change: transform;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.bande img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

/* Animation défilement vertical */
@keyframes scrollUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100vh);
  }
}

/* ════════════════════════════════════════════════════════════
   CARROUSEL BANDES VIE (Bloc "Et après")
   Carrousel simple avec transitions douces
   ════════════════════════════════════════════════════════════ */

/* ── CONTENEUR ─────────────────────────────────────────────── */
.bandes-carousel-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-hover);
  box-shadow: var(--shadow-hover);
}

/* ── ZONE AFFICHAGE ────────────────────────────────────────── */
.bandes-carousel-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.bandes-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bandes-carousel-img.active {
  opacity: 1;
}

/* ── NAVIGATION DOTS ───────────────────────────────────────── */
.bandes-carousel-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.bandes-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.bandes-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

.bandes-carousel-dot.active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.3);
}

/* ── FLÈCHES NAVIGATION ────────────────────────────────────── */
.bandes-carousel-prev,
.bandes-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: none; /* Masqué par défaut (mobile) */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.bandes-carousel-prev {
  left: 0.75rem;
}

.bandes-carousel-next {
  right: 0.75rem;
}

.bandes-carousel-prev:hover,
.bandes-carousel-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Desktop : flèches apparaissent au hover */
@media (min-width: 768px) {
  .bandes-carousel-prev,
  .bandes-carousel-next {
    display: flex;
  }
  
  .bandes-carousel-container:hover .bandes-carousel-prev,
  .bandes-carousel-container:hover .bandes-carousel-next {
    opacity: 1;
  }
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bandes-carousel-container {
    max-width: 100%;
  }
  
  .bandes-carousel-nav {
    bottom: 0.75rem;
  }
}

/* ── VALEURS ───────────────────────────────────────────────── */
.valeur-bloc {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.valeur-bloc:last-child {
  border-bottom: none;
}

.valeur-bloc h2 {
  margin-bottom: 1rem;
}

.valeur-texte p {
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ── INCLUS ────────────────────────────────────────────────── */
.inclus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.inclus-grid h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── PAGE HEADER ───────────────────────────────────────────── */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header .label {
  display: block;
  margin-bottom: 0.5rem;
}

.section-header {
  margin-bottom: 2rem;
}

/* ── CONTACT ───────────────────────────────────────────────── */
.contact-link {
  font-family: var(--font-mono);
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-link:hover {
  color: var(--accent-hover);
}
/* ════════════════════════════════════════════════════════════
   RÉALISATIONS - SCROLL HORIZONTAL
   ════════════════════════════════════════════════════════════ */

/* ── CONTENEUR SCROLL ──────────────────────────────────────── */
.realisations-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem 0.5rem;
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-hover);
}

.realisations-scroll::-webkit-scrollbar {
  height: 6px;
}

.realisations-scroll::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 3px;
}

.realisations-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.realisations-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* ── CARTES RÉALISATIONS ───────────────────────────────────── */
.realisation-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: 
    box-shadow var(--transition-slow),
    border-color var(--transition),
    transform var(--transition);
}

.realisation-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.realisation-body {
  padding: 1.25rem;
}

.realisation-body h3 {
  margin: 0.25rem 0 0.5rem;
}

.realisation-body .label {
  display: block;
  margin-bottom: 0.25rem;
}

/* ── CARROUSELS RÉALISATIONS ───────────────────────────────── */
.realisation-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-hover);
  overflow: hidden;
}

.carousel-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-img.active {
  opacity: 1;
}

/* Navigation dots */
.carousel-nav {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 10;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.3);
}

/* Flèches navigation */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.carousel-prev {
  left: 0.5rem;
}

.carousel-next {
  right: 0.5rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Desktop : flèches apparaissent au hover */
@media (min-width: 768px) {
  .carousel-prev,
  .carousel-next {
    display: flex;
  }
  
  .realisation-carousel:hover .carousel-prev,
  .realisation-carousel:hover .carousel-next {
    opacity: 1;
  }
}

/* ── VIDÉO RÉALISATIONS ────────────────────────────────────── */
.realisation-video {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-hover);
  overflow: hidden;
}

.realisation-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (min-width: 768px) {
  .realisation-card {
    flex: 0 0 320px;
  }
  
  .realisations-scroll {
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .realisation-card {
    flex: 0 0 360px;
  }
}


/* ════════════════════════════════════════════════════════════
   4. CONTEXTE GALERIES (body.context-gallery)
   Styles spécifiques pour galeries photos
   ════════════════════════════════════════════════════════════ */

body.context-gallery .gallery-header {
  order: 0;
}

body.context-gallery main#content {
  order: 1;
}

body.context-gallery .gallery-actions {
  order: 2;
}

/* ── LAYOUT GALERIE (scroll horizontal par défaut) ─────────── */
body.context-gallery .gallery {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  /* ═══ AUDIT 2024-03 ═══
     OLD: gap: 1.5rem (mobile) → 0.75rem (768px) → 0.75rem (1024px)
     NEW: gap: 0.75rem (mobile) → 1rem (768px) → 1.5rem (1024px)
     WHY: Progression logique, évite effet "collé" sur grands écrans
     ═══════════════════════ */
  gap: 0.75rem;
  padding: 0.5rem;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

@media (min-width: 768px) {
  body.context-gallery .gallery {
    gap: 1rem;
    padding: 0.75rem;
  }
}

@media (min-width: 1024px) {
  body.context-gallery .gallery {
    gap: 1.5rem;
    padding: 1rem;
  }
}

body.context-gallery .gallery::-webkit-scrollbar { height: 6px; }
body.context-gallery .gallery::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 3px;
}
body.context-gallery .gallery::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 3px;
}

/* ── PHOTO CARDS ───────────────────────────────────────────── */
body.context-gallery .photo-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: clamp(90px, 20vw, 200px);
  max-height: 100%;
  background: var(--bg);
  border-radius: var(--radius);
  /* ═══ AUDIT 2024-03 ═══
     OLD: padding: 0.7rem (fixe)
     NEW: padding responsive progressif
     WHY: Plus d'espace sur desktop, meilleur confort visuel
     ═══════════════════════ */
  padding: 0.7rem;
  position: relative;
  opacity: 0.9;
  cursor: pointer;
  border: 1px solid transparent;
  -webkit-touch-callout: default;
  transition:
    transform var(--transition),
    opacity var(--transition),
    border-color var(--transition);
}

@media (min-width: 768px) {
  body.context-gallery .photo-card {
    padding: 0.85rem;
  }
}

@media (min-width: 1024px) {
  body.context-gallery .photo-card {
    padding: 1rem;
  }
}

body.context-gallery .photo-card:hover {
  opacity: 1;
  transform: scale(1.01);
}

body.context-gallery .photo-card.selected {
  opacity: 0.7;
  border-color: var(--accent);
  outline-offset: 2px;
  border-width:2px;
}

body.context-gallery .photo-card img {
  width: 100%;
  height: auto;
  min-height: 150px;
  /* ═══ AUDIT 2024-03 ═══
     OLD: max-height: 50vh (responsive)
     NEW: max-height: min(50vh, 400px) etc.
     WHY: Sécurise affichage, évite bugs barre navigateur mobile
     ═══════════════════════ */
  max-height: min(50vh, 400px);
  object-fit: contain;
  margin-top: 0.35rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
  -webkit-touch-callout: default;
  transition: transform var(--transition);
}

@media (min-width: 768px) {
  body.context-gallery .photo-card img {
    min-height: 180px;
    max-height: min(55vh, 450px);
  }
}

@media (min-width: 1024px) {
  body.context-gallery .photo-card img {
    min-height: 200px;
    max-height: min(60vh, 500px);
  }
}

/* Indicateur sélection */
body.context-gallery .select-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: background var(--transition), border-color var(--transition);
  opacity:0.7;
}

body.context-gallery .photo-card.selected .select-indicator {
  background: var(--accent);
  border-color: var(--accent);
}

body.context-gallery .photo-card.selected .select-indicator::after {
  content: '✓';
  color: #ffffff;
  font-weight: 700;
}

/* Bouton menu photo */
body.context-gallery .photo-menu-btn {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 5;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
  display: none;
}

body.context-gallery .photo-menu-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

/* ── STATUS BADGES ─────────────────────────────────────────── */
body.context-gallery .status-badge {
  flex-shrink: 0;
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-body);
  /* ═══ AUDIT 2024-03 ═══
     OLD: font-size: 0.72rem
     NEW: font-size: 0.8rem
     WHY: Meilleure lisibilité sur écrans haute résolution
     ═══════════════════════ */
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 0px solid var(--border);
  color: var(--text);
  background: var(--bg-hover);
  cursor: pointer;
  user-select: none;
  transition: 
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

body.context-gallery .status-badge.status-private { border-color: #bfb7ad; }
body.context-gallery .status-badge.status-circle  { border-color: #c0c0c0; }
body.context-gallery .status-badge.status-public  { border-color: var(--accent); }

body.context-gallery .status-badge::before { margin-right: 0.3rem; }
body.context-gallery .status-badge.status-private::before { content: var(--icon-private); }
body.context-gallery .status-badge.status-circle::before  { content: var(--icon-circle); }
body.context-gallery .status-badge.status-public::before  { content: var(--icon-public); }

body.context-gallery .status-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.context-gallery .status-badge:active {
  transform: translateY(0);
  transition: transform 0.05s ease;
}

body.context-gallery .status-badge.status-private:hover {
  border-color: var(--status-private);
  background: rgba(58, 58, 58, 0.1);
}

body.context-gallery .status-badge.status-circle:hover {
  border-color: var(--status-circle);
  background: rgba(107, 100, 91, 0.1);
}

body.context-gallery .status-badge.status-public:hover {
  border-color: var(--accent);
  background: rgba(61, 90, 80, 0.1);
}

body.context-gallery .status-badge.changing {
  animation: badgePulse 0.3s ease;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

body.context-gallery .status-badge-small {
  /* ═══ AUDIT 2024-03 ═══
     OLD: font-size: 0.75rem
     NEW: font-size: 0.8rem
     WHY: Meilleure lisibilité sur écrans haute résolution
     ═══════════════════════ */
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  color: var(--text-muted);
}

body.context-gallery .status-badge-small.status-private::before { content: var(--icon-private); margin-right: 0.25rem; }
body.context-gallery .status-badge-small.status-circle::before  { content: var(--icon-circle); margin-right: 0.25rem; }
body.context-gallery .status-badge-small.status-public::before  { content: var(--icon-public); margin-right: 0.25rem; }

/* ── HEADER GALERIE ────────────────────────────────────────── */
body.context-gallery .gallery-header {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  body.context-gallery .gallery-header {
    padding: 0.65rem 1rem;
  }
}

@media (min-width: 1024px) {
  body.context-gallery .gallery-header {
    padding: 0.75rem 1rem;
  }
}

body.context-gallery .gallery-header h1 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  margin: 0;
}

@media (min-width: 768px) {
  body.context-gallery .gallery-header h1 {
    font-size: 1.05rem;
  }
}

@media (min-width: 1024px) {
  body.context-gallery .gallery-header h1 {
    font-size: 1.2rem;
  }
}

body.context-gallery .session-id,
body.context-gallery .event-badge,
body.context-gallery .auth-badge {
  /* ═══ AUDIT 2024-03 ═══
     OLD: font-size: 0.7rem
     NEW: font-size: 0.8rem
     WHY: Meilleure lisibilité sur écrans haute résolution
     ═══════════════════════ */
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  display: none;
}

@media (min-width: 768px) {
  body.context-gallery .session-id,
  body.context-gallery .event-badge,
  body.context-gallery .auth-badge {
    display: inline-block;
  }
}

body.context-gallery .header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.context-gallery .header-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  body.context-gallery .header-actions {
    gap: 0.5rem;
  }
}

@media (min-width: 1024px) {
  body.context-gallery .header-actions {
    gap: 0.6rem;
  }
}

/* ── FOOTER ACTIONS GALERIE ────────────────────────────────── */
body.context-gallery .gallery-actions {
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.75rem + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  bottom: 3rem;
  z-index: 140;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  body.context-gallery .gallery-actions {
    padding: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

body.context-gallery .actions-row {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  body.context-gallery .actions-row {
    gap: 0.6rem;
  }
}

body.context-gallery .action-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

body.context-gallery .selection-info {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

@media (min-width: 768px) {
  body.context-gallery .selection-info {
    font-size: 0.85rem;
  }
}

body.context-gallery .btn-icon {
  display: inline;
}

body.context-gallery .btn-text {
  display: none;
  margin-left: 0.25rem;
}

@media (min-width: 768px) {
  body.context-gallery .btn-text {
    display: inline;
  }
}

/* ── BARRE SÉLECTION ───────────────────────────────────────── */
body.context-gallery .selection-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  margin-bottom: 0rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
 body.context-gallery .selection-bar {
    padding: 0.5rem 0;
    }
}

body.context-gallery .selection-badge {
  /* ═══ AUDIT 2024-03 ═══
     OLD: font-size: 0.75rem
     NEW: font-size: 0.8rem
     WHY: Meilleure lisibilité sur écrans haute résolution
     ═══════════════════════ */
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* ── MENU STATUT (bottom sheet) ────────────────────────────── */
body.context-gallery .status-menu-content {
  background: var(--bg-card);
  width: 100%;
  max-width: 340px;
  padding: 1.25rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--border);
  border-bottom: none;
}

body.context-gallery .status-menu-content h3 {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text);
}

/* ── STATUS PICKER OVERLAY (global + individuel) ───────────── */
body.context-gallery .status-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

body.context-gallery .status-picker-overlay.active {
  display: flex;
}

body.context-gallery .status-picker-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 320px;
  overflow: hidden;
}

body.context-gallery .status-picker-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

body.context-gallery .status-picker-header h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

body.context-gallery .status-picker-options {
  padding: 0.5rem 0;
}

body.context-gallery .status-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  width: 100%;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: left;
  color: var(--text);
}

body.context-gallery .status-option:hover {
  background: var(--bg-hover);
}

body.context-gallery .status-option.active {
  background: var(--bg-warm);
  font-weight: 600;
}

body.context-gallery .status-option-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

body.context-gallery .status-option-label {
  flex: 1;
}

body.context-gallery .status-option-label > div:first-child {
  font-weight: 500;
  margin-bottom: 0.15rem;
}

body.context-gallery .status-option-desc {
  /* ═══ AUDIT 2024-03 ═══
     OLD: font-size: 0.75rem
     NEW: font-size: 0.8rem
     WHY: Meilleure lisibilité sur écrans haute résolution
     ═══════════════════════ */
  font-size: 0.8rem;
  color: var(--text-muted);
}

body.context-gallery .status-option[data-status="private"] .status-option-icon {
  color: var(--status-private);
}

body.context-gallery .status-option[data-status="circle"] .status-option-icon {
  color: var(--status-circle);
}

body.context-gallery .status-option[data-status="public"] .status-option-icon {
  color: var(--accent);
}

body.context-gallery .status-picker-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}

body.context-gallery .status-picker-footer.hidden {
  display: none;
}

body.context-gallery .status-picker-footer .btn-primary,
body.context-gallery .status-picker-footer .btn-secondary {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

body.context-gallery .status-actions .btn-primary,
body.context-gallery .status-actions .btn-secondary { 
  width: 100%; 
}

body.context-gallery .footer-wrapper { 
  position: sticky;
  bottom: 0;
  z-index: 140;
  background: var(--bg-card);
  flex-shrink: 0;
  order: 2;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  margin-top: auto;
}

body.context-gallery .footer-wrapper .gallery-actions {
  position: static;
  z-index: auto;
  box-shadow: none;
}

body.context-gallery .footer-wrapper .site-footer {
  position: static;
  z-index: auto;
  box-shadow: none;
}

/* ── TIMER OVERLAY (iPad kiosque) ──────────────────────────── */
body.context-gallery .timer-overlay,
body.context-gallery #timer-overlay {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: var(--bg-warm);
  border-bottom: 2px solid var(--border);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease;
}

@media (min-width: 768px) {
  body.context-gallery .timer-overlay,
  body.context-gallery #timer-overlay {
    padding: 0.75rem 1.5rem;
  }
}

body.context-gallery .timer-overlay.warning,
body.context-gallery #timer-overlay.warning {
  background: #fff3cd;
  border-bottom-color: #ffc107;
}

body.context-gallery .timer-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

@media (min-width: 768px) {
  body.context-gallery .timer-text {
    font-size: 1rem;
  }
}

body.context-gallery .timer-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ════════════════════════════════════════════════════════════
   5. CONTEXTE SHARED (Galerie partagée - Grid vertical)
   Usage: <body class="context-gallery context-shared">
   ════════════════════════════════════════════════════════════ */

body.context-shared #content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body.context-shared .gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  overflow-x: visible !important;
  overflow-y: auto;
  padding: 0.4rem;
  align-items: start;
  flex: 1;
  min-height: 0;
}

@media (min-width: 768px) {
  body.context-shared .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 0.5rem;
  }
}

@media (min-width: 1024px) {
  body.context-shared .gallery {
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    padding: 0.75rem;
    max-width: 1400px;
    margin: 0 auto;
  }
}

body.context-shared .photo-card {
  max-width: none;
  width: 100%;
  height: fit-content;
  min-height: 0;
  max-height: none;
  padding: 1.25rem;
  align-self: start;
}

body.context-shared .photo-card img {
  width: 100%;
  max-width: 110px;
  height: auto;
  /* ═══ AUDIT 2024-03 ═══
     OLD: max-height: 45vh (responsive)
     NEW: max-height: min(45vh, 350px) etc.
     WHY: Sécurise affichage, évite bugs barre navigateur mobile
     ═══════════════════════ */
  max-height: min(45vh, 350px);
  aspect-ratio: 1 / 5.1;
  object-fit: contain;
  min-height: 1px;
  display: block;
  margin-top: 0;
}

@media (min-width: 768px) {
  body.context-shared .photo-card img {
    max-width: 130px;
    max-height: min(50vh, 400px);
  }
}

@media (min-width: 1024px) {
  body.context-shared .photo-card img {
    max-width: 150px;
    max-height: min(55vh, 450px);
  }
}

body.context-shared .select-indicator {
  top: 0.4rem;
  right: 0.4rem;
}

body.context-shared .photo-menu-btn {
  top: 0.4rem;
  left: 0.4rem;
}

body.context-shared .photo-card img {
  content-visibility: auto;
}

body.context-shared .photo-card img:not([src]) {
  background: linear-gradient(
    90deg,
    var(--bg-hover) 0%,
    var(--border) 50%,
    var(--bg-hover) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.context-shared .gallery::-webkit-scrollbar {
  width: 8px;
  height: auto;
}

body.context-shared .gallery::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 4px;
}

body.context-shared .gallery::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

body.context-shared .gallery {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-hover);
}

body.context-shared .footer-wrapper {
  position: sticky;
  bottom: 0;
  z-index: 140;
  background: var(--bg-card);
  flex-shrink: 0;
  order: 2;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

body.context-shared .footer-wrapper .gallery-actions {
  position: static;
  z-index: auto;
  box-shadow: none;
}

body.context-shared .footer-wrapper .site-footer {
  position: static;
  z-index: auto;
  box-shadow: none;
  order: auto;
}

/* ════════════════════════════════════════════════════════════
   6. UTILITAIRES
   ════════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 2rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 2rem; }


/* ════════════════════════════════════════════════════════════
   FLASH PORTRAITS (Bloc "Pendant")
   Diaporama flash façon miroir photomaton
   ════════════════════════════════════════════════════════════ */

/* ── CONTENEUR PRINCIPAL ───────────────────────────────────── */
.flash-portraits-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 520 / 680;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

/* ── ZONE D'AFFICHAGE ──────────────────────────────────────── */
.flash-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flash-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.flash-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 1;
}

/* Animation flash (appliquée via JS) */
.flash-overlay.flash-active {
  animation: flashWhite 0.08s ease-out;
}

@keyframes flashWhite {
  0% { background: transparent; }
  50% { background: rgba(255, 255, 255, 0.95); }
  100% { background: transparent; }
}

/* ── WARNING ACCESSIBILITÉ ─────────────────────────────────── */
.flash-warning {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.flash-warning.hidden {
  opacity: 0;
  pointer-events: none;
}

.flash-warning-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius);
  font-size: 0.7rem;
  cursor: pointer;
  transition: background var(--transition);
}

.flash-warning-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── CONTRÔLES (PAUSE/MUTE) ────────────────────────────────── */
.flash-controls {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  display: flex;
  gap: 0.4rem;
  opacity: 1;
  transition: opacity var(--transition);
}

/* Desktop : apparaît au hover du conteneur */
@media (min-width: 768px) {
  .flash-controls {
    opacity: 0;
  }
  
  .flash-portraits-container:hover .flash-controls {
    opacity: 1;
  }
}

.btn-flash-control {
  width: 2rem;
  height: 2rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  backdrop-filter: blur(4px);
}

.btn-flash-control:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}

.btn-flash-control:active {
  transform: scale(0.98);
}

/* ── MODE REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .flash-overlay.flash-active {
    animation: none;
    background: transparent !important;
  }
  
  .flash-portrait {
    transition: opacity 0.6s ease;
  }
}

/* ── ÉTAT PAUSE ────────────────────────────────────────────── */
.flash-portraits-container.paused .flash-portrait {
  opacity: 1 !important;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .flash-portraits-container {
    max-width: 280px;
  }
  
  .flash-warning {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
  
  .btn-flash-control {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
  }
}

/* ════════════════════════════════════════════════════════════
   7. RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 600px) {
  .nav-toggle {
    display: flex;
    align-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.6rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "img1"
      "text";
    gap: 1rem;
    text-align: center;

  }

  .hero-img1 {
    width: 100%;
    justify-self: center;
  }

  .hero-img1 .img-wrap {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .bloc-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Toujours image puis texte */
  .bloc-img {
    order: 2;
  }

  .bloc-text {
    order: 1;
  }
  
  /*.bloc-grid.reverse .bloc-img {
    order: 0;
  }*/

  .inclus-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (min-width: 768px) {
  .gallery {
    gap: 1rem;
    padding: 1.5rem;
  }

  .photo-card { width: 150px; }

  .status-menu { align-items: center; }

  .status-menu-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
  }

  .welcome-modal-content { max-width: 450px; }
  .confirm-modal-content { max-width: 400px; }
}

/* ════════════════════════════════════════════════════════════
   FIN - Fichier unifié complet
   ════════════════════════════════════════════════════════════ */
