/* ============================================================
   MORPHESYS V2.5 — La matière-mémoire
   Fond + harmonisation des couleurs (accueil, l'équipe)

   Fichier unique, sans dépendance, réversible :
   retirer le <link> et le <div class="matiere-memoire"> d'une page
   la ramène exactement à son état V2.

   Chargé APRÈS les styles en ligne de chaque page : les variables
   ci-dessous remplacent donc celles de la V2 sans toucher au HTML.
   ============================================================ */

/* ------------------------------------------------------------
   1. Palette — guide de marque « Femmes en Mémoire »
   ------------------------------------------------------------ */
:root {
  --mm-creme: #FDF9F5;
  --mm-beige: #E9D6C8;
  --mm-terracotta: #D66A45;
  --mm-bleu: #AFC6D6;
  --mm-ardoise: #6C7A86;
  --mm-sable: #C98F73;

  /* Variables V2 réaccordées à la matière-mémoire
     (contrastes vérifiés sur crème : encre 12,8:1 · encre douce 9,2:1
      · encre atténuée 5,9:1 · accent terracotta profond 5,5:1) */
  --bg: #FDF9F5;
  --bg-soft: #F6EDE5;
  --bg-warm: #FBF3EC;
  --bg-box: rgba(253, 249, 245, 0.9);
  --bg-box-border: rgba(201, 143, 115, 0.24);

  --ink: #26303A;          /* ardoise profonde — titres */
  --ink-soft: #3B4651;     /* textes courants */
  --ink-mute: #56636F;     /* textes secondaires */
  --ink-faint: #A9B4BE;

  --gold: #A8492A;         /* accent terracotta profond (petits textes, filets) */
  --gold-deep: #8E3C22;    /* accent appuyé (italiques, mots-clés) */
  --line: rgba(108, 122, 134, 0.2);
  --line-soft: rgba(108, 122, 134, 0.11);
  --line-gold: rgba(214, 106, 69, 0.38);
}

/* Le fond général : crème lumineux. L'ancien halo gris est retiré,
   remplacé par la couche matière-mémoire. */
body {
  background-color: var(--mm-creme);
  background-image: none;
}

/* ------------------------------------------------------------
   2. La couche matière-mémoire
   Fixe, derrière tous les contenus, ne capte aucun clic.
   La matière reste en place pendant le défilement : les contenus
   passent devant elle, elle semble traverser l'espace du site.
   ------------------------------------------------------------ */
.matiere-memoire {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--mm-creme);
}

/* Plan proche : la matière elle-même (voiles, brume, ébullition,
   ferrofluide, reliance, cristallisation, sphère-mémoire) */
.matiere-memoire__plan {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/fond/matiere-memoire-desktop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: 60% 40%;
}

/* Plan lointain : voiles diffus qui prolongent la matière
   au-delà de l'image et lui donnent de la profondeur */
.matiere-memoire::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 38vw 30vw at 0% 100%, rgba(175, 198, 214, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 34vw 28vw at 100% 0%, rgba(201, 143, 115, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 30vw 22vw at 100% 100%, rgba(233, 214, 200, 0.35) 0%, transparent 72%);
  mix-blend-mode: multiply;
}

/* Zone de calme : un souffle de crème au centre pour garantir
   la lecture, sans effacer la matière autour du logo et du titre */
.matiere-memoire::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 34% 40% at 50% 46%, rgba(253, 249, 245, 0.55) 0%, rgba(253, 249, 245, 0.2) 60%, transparent 100%);
}

/* Mobile et écrans en portrait : composition verticale,
   la matière entre par le haut et le bas */
@media (orientation: portrait) and (max-width: 1024px) {
  .matiere-memoire__plan {
    background-image: url('../assets/images/fond/matiere-memoire-mobile.webp');
    transform-origin: 50% 50%;
    top: 84px; /* la navigation mobile est haute : la matière commence juste dessous */
    /* Sur petit écran, les textes passent devant toute la hauteur :
       la matière reste pleine en haut, s'adoucit dans la moitié basse */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 24%, rgba(0, 0, 0, 0.3) 44%, rgba(0, 0, 0, 0.3) 72%, rgba(0, 0, 0, 0.5) 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 24%, rgba(0, 0, 0, 0.3) 44%, rgba(0, 0, 0, 0.3) 72%, rgba(0, 0, 0, 0.5) 100%);
  }
  .matiere-memoire::after {
    background:
      radial-gradient(ellipse 80% 34% at 50% 55%, rgba(253, 249, 245, 0.55) 0%, transparent 100%);
  }
}

/* Respiration très lente de la matière (55 s par cycle,
   transformation seule, gérée par le processeur graphique) */
@media (prefers-reduced-motion: no-preference) {
  .matiere-memoire__plan {
    animation: mm-respire 55s ease-in-out infinite alternate;
  }
}
@keyframes mm-respire {
  from { transform: scale(1); }
  to   { transform: scale(1.035) translate3d(-0.6%, 0.4%, 0); }
}

/* ------------------------------------------------------------
   3. Harmonisation des supports (cartes, encadrés, navigation)
   Fonds crème très légèrement translucides : la matière se devine
   derrière, les cartes restent des zones de stabilité et de repos.
   ------------------------------------------------------------ */
.site-nav {
  background: rgba(253, 249, 245, 0.84);
  border-bottom-color: rgba(201, 143, 115, 0.18);
}

/* Accueil */
.trajectory-card {
  background: rgba(253, 249, 245, 0.92);
  border-color: rgba(201, 143, 115, 0.26);
  box-shadow: 0 6px 28px -10px rgba(108, 122, 134, 0.18);
}
.trajectory-card:hover {
  border-color: rgba(214, 106, 69, 0.45);
  box-shadow: 0 24px 50px -20px rgba(108, 122, 134, 0.28);
}
.card-visual {
  background: linear-gradient(160deg, #F8F0E8 0%, #F1E6DC 60%, #EEF1F2 100%);
  border-bottom-color: rgba(201, 143, 115, 0.18);
}
.chronique-mini-card {
  background: rgba(255, 252, 248, 0.94);
  border-color: rgba(201, 143, 115, 0.2);
}
.chronique-mini-card:hover {
  border-color: rgba(214, 106, 69, 0.45);
}

/* L'équipe */
.member-card,
.team-statement-box {
  box-shadow: 0 6px 28px -10px rgba(108, 122, 134, 0.16);
}
.member-steps-mini {
  background: rgba(255, 252, 248, 0.94);
}

/* Pied de page : légère base crème pour la lisibilité des liens */
footer {
  background: linear-gradient(to bottom, rgba(253, 249, 245, 0.35) 0%, rgba(253, 249, 245, 0.9) 40%);
  border-top-color: rgba(201, 143, 115, 0.18);
}

/* ------------------------------------------------------------
   4. Extension à toutes les pages (V2.5)
   Trois niveaux d'opacité, selon l'usage :
   - zones de lecture longue : 0.95 (la matière ne gêne jamais le texte)
   - cartes et encadrés courts : 0.92
   - vignettes, bulles, légendes : 0.88 à 0.94
   ------------------------------------------------------------ */

/* Zones de lecture longue */
.artist-narrative,
.chronique-article,
.legal-content-section,
.text-content-section {
  background: rgba(253, 249, 245, 0.95);
  border-color: rgba(201, 143, 115, 0.22);
  box-shadow: 0 8px 32px -14px rgba(108, 122, 134, 0.16);
}

/* Encadrés et cartes de contenu */
.quote-box,
.nested-experience-box,
.nourish-box,
.format-card,
.resource-card,
.step-card,
.nourish-card,
.resonance-card,
.audio-player-card {
  background: rgba(253, 249, 245, 0.92);
  border-color: rgba(201, 143, 115, 0.24);
  box-shadow: 0 6px 28px -12px rgba(108, 122, 134, 0.16);
}
.format-card:hover,
.resource-card:hover,
.step-card:hover,
.nourish-card:hover,
.resonance-card:hover {
  border-color: rgba(214, 106, 69, 0.45);
  box-shadow: 0 22px 46px -20px rgba(108, 122, 134, 0.26);
}

/* Cartes mises en avant : beige rosé du guide, à la place du gris-crème */
.resource-card--collaborer,
.step-card--highlight {
  background: rgba(246, 237, 229, 0.95);
  border-color: rgba(214, 106, 69, 0.38);
}

/* Supports d'images et légendes */
.chronique-media,
.research-media-container {
  background: #FDF9F5;
  border-color: rgba(201, 143, 115, 0.22);
}
.work-media-container,
.step-thumb-box,
.psai-graphic-bubble,
.stone-graphic-bubble {
  background: linear-gradient(160deg, #F8F0E8 0%, #F1E6DC 60%, #EEF1F2 100%);
}
.media-caption,
.chronique-media-caption {
  background: rgba(253, 249, 245, 0.94);
}
.artist-portrait-frame,
.circulation-node,
.member-bubble-frame {
  background: rgba(253, 249, 245, 0.9);
}

/* La vidéo d'Exha Vocalis garde son écrin sombre (#0a0908) : non modifié. */

/* Faire grandir : l'adresse e-mail sous « Parlons-nous » utilisait --ink-faint
   (contraste insuffisant sur la crème). Couleur en ligne dans le HTML,
   d'où !important ; seul le ton change, le texte reste identique. */
.collab-contact__link ~ span {
  color: var(--ink-mute) !important;
}
