/* =========
   Font face (Syne)
   ========= */

@font-face {
  font-family: "Syne";
  src: url("syne-variablefont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* =========
   Variables (charte REx-Fluvius)
   ========= */

:root {
  --color-bg: #F0EBE3;      /* fond chaud clair */
  --color-surface: #ffffff; /* cartes & sections blanches */
  --color-surface-alt: #E5F3DB; /* léger vert très pâle pour alterner */
  --color-primary: #2B79B8; /* bleu REx-Fluvius */
  --color-primary-soft: #E0F2FF;
  --color-accent: #70A937;  /* vert vif */
  --color-accent-dark: #678331;
  --color-accent-light: #9ACC69;
  --color-text: #1b2733;
  --color-muted: #6b7b8a;
  --rex-blue: #0b3c49;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --font-sans: "Syne", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-heading: "Syne", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

/* =========
   Base
   ========= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top left, #ffffff 0, var(--color-bg) 55%);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container utilitaire */

.container {
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
}

/* =========
   Header & Navigation
   ========= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(240, 235, 227, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.4rem;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 46px;
  width: auto;
}

/* Sur mobile on pourra réduire un peu le logo */
@media (max-width: 700px) {
  .brand-logo {
    height: 38px;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--color-muted);
  font-weight: 500;
  padding-block: 0.2rem;
  position: relative;
}

.site-nav a:hover {
  color: var(--color-primary);
}

.site-nav a.nav-active {
  color: var(--color-primary);
  font-weight: 600;
}

.site-nav a.nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--color-primary);
}

/* =========
   Boutons
   ========= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--color-primary), #1f5180);
  color: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;
  border: 1px solid rgba(43, 121, 184, 0.35);
}

.btn-small {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

.btn-large {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
}

/* =========
   Hero (accueil) & page-hero
   ========= */

.hero {
  padding-block: var(--space-xl);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 4vw, 3.1rem);
  margin: 0 0 0.5rem;
  z-index: 0;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--rex-blue);
  max-width: 36rem;
}

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

.hero-meta {
  font-size: 0.9rem;
  color: var(--rex-blue);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rex-blue);
  margin-bottom: 0.4rem;
}

.hero-aside {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-card li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.hero-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* Hero de pages internes */

.page-hero {
  padding-block: 3rem 2rem;
  background: linear-gradient(135deg, #ffffff, var(--color-bg));
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.page-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin: 0;
}

.page-hero p {
  max-width: 40rem;
  color: var(--color-muted);
  margin: 0;
}

/* =========
   Sections générales
   ========= */

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

.section-alt {
  background: var(--color-surface-alt);
}

.section-header {
  text-align: left;
  margin-bottom: var(--space-md);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.section-header p {
  max-width: 100%;
  color: var(--color-muted);
}

/* Colonnes simples */

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

.columns h3,
.columns h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-top: 0;
}

/* Grilles de cartes */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card h3 {
  font-family: var(--font-heading);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* =========
   Accueil : actualités & blocs
   ========= */

.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
}

.news-list {
  display: grid;
  gap: 1rem;
}

.news-item {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.news-item h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.news-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}

.news-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.news-side {
  display: grid;
  gap: 1rem;
}

/* =========
   Intervenants (carte)
   ========= */

.speaker-card .speaker-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.speaker-card .speaker-topic {
  font-size: 0.95rem;
}

/* =========
   Infos pratiques
   ========= */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.info-item h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.3rem;
}

/* =========
   CTA bandeau
   ========= */

.section-cta {
  background: linear-gradient(135deg, var(--color-primary), #1f5180);
  color: #ffffff;
}

.section-cta .cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.section-cta h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  margin: 0 0 0.5rem;
}

.section-cta p {
  margin: 0;
  max-width: 32rem;
}

/* =========
   Formulaires (membres / contact / inscriptions)
   ========= */

.form-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.7rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.03);
  max-width: 420px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 0.55rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(43, 121, 184, 0.15);
}

/* =========
   Footer
   ========= */

.site-footer {
  padding-block: 1.5rem;
  background: #0f1722;
  color: #cbd5e1;
  margin-top: 2rem;
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
}

.footer-meta {
  margin-top: 0.2rem;
  color: #9ca3af;
}

/* =========
   Responsif
   ========= */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    justify-content: flex-start;
  }

  .section-cta .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .columns {
    grid-template-columns: 1fr;
  }
}


/* =========
   Hero vidéo commun à toutes les pages
   ========= */

.hero {
  position: relative;
  padding-block: var(--space-xl);
  overflow: hidden;
  z-index: 0;
}

.hero-with-video {
  padding-block: 5rem 4rem;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

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

/* Légère teinte pour garder la lisibilité du texte */
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.50),
    rgba(15, 23, 42, 0.25)
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-overlay-card {
  background: rgba(154, 204, 105, 0.87); /* vert clair translucide */
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.8rem;
  box-shadow: var(--shadow-soft);
  max-width: 100%;
}

.hero-overlay-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
}

.hero-overlay-side h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.hero-overlay-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-overlay-side li {
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.hero-overlay-side li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .hero-with-video {
    padding-block: 4rem 3rem;
  }

  .hero-overlay-card {
    padding: 1.4rem 1.4rem;
  }

  .hero-overlay-grid {
    grid-template-columns: 1fr;
  }
}
  .membres-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.membres-table th,
.membres-table td {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

.membres-table th {
  text-align: left;
  font-weight: 700;
}

.membres-table td:last-child {
  width: 180px;
  text-align: right;
}

/* =========
   Ressources (grille de cadres)
   ========= */

.section-library {
  padding-block: 2.2rem var(--space-xl);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

@media (max-width: 980px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .library-grid {
    grid-template-columns: 1fr;
  }
}

.library-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3; 
  min-height: 220px;
  background-size: 105%;
  transition: background-size 0.4s ease;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(43, 121, 184, 0.18);
}

.library-card:hover {
  background-size: 110%;
}

.library-card-media {
  position: absolute;
  inset: 0;
  background-image: var(--library-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(0.98) contrast(1.02);
}

.library-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Voile pour lisibilité du texte, harmonisé avec la charte */
  background: linear-gradient(
    180deg,
    rgba(11, 60, 73, 0.08) 0%,
    rgba(11, 60, 73, 0.35) 55%,
    rgba(11, 60, 73, 0.82) 100%
  );
  pointer-events: none;
}

.library-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem;
  background: linear-gradient(
    180deg,
    rgba(11, 60, 73, 0.05) 0%,
    rgba(11, 60, 73, 0.35) 55%,
    rgba(11, 60, 73, 0.85) 100%
  );
}

.library-card-overlay h2 {
  margin: 0;
  color: #F2F2EE;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.library-card-overlay p {
  margin: 0;
  color: rgba(242, 242, 238, 0.88);
  font-size: 0.95rem;
  max-width: 44ch;
}

.library-card:hover,
.library-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(43, 121, 184, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.library-card:focus-visible {
  box-shadow:
    0 0 0 3px rgba(43, 121, 184, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   Ressources – niveaux (milieux + triade) et états actifs
   ========================================================= */

.library-grid-main{
  margin-top: 1.2rem;
}

.library-grid-triad{
  margin-top: 1.6rem;
}

.library-card--small{
  aspect-ratio: 5 / 3;
  min-height: 180px;
}

.library-card.is-active {
  outline: 3px solid #2B79B8;
  outline-offset: -3px;
  box-shadow:
    0 0 0 3px rgba(107, 142, 110, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.docs-hint{
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.library-docs{
  margin-top: 1.9rem;
}

.docs-list{
  margin-top: 1rem;
  padding-left: 1.2rem;
}

.docs-list li{
  margin: 0.6rem 0;
}

.docs-list a{
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.docs-list a:hover{
  text-decoration: underline;
}

.doc-meta{
  display: inline-block;
  margin-left: 0.6rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

@media (max-width: 700px){
  .library-grid{
    grid-template-columns: 1fr;
  }
  .library-card--small{
    min-height: 170px;
  }
}
/*================
Fleche retour haut
================ */

#backToTop {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: none;
    z-index: 999999 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#backToTop:hover{
  transform: scale(1.1);
  background-color: var(--color-accent-light);
}

/*================
ressources
================ */

.library-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.8rem;
}

.doc-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.4rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.doc-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.doc-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}

.doc-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.6rem;
}

.doc-description {
  font-size: 0.92rem;
  color: var(--color-text);
  margin-bottom: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .doc-card {
    grid-template-columns: 1fr;
  }

  .doc-cover img {
    max-width: 160px;
  }
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
}

/* Élargir le header de section (texte) */
.section-alt .section-header {
  max-width: 900px;   /* ajuste (ex: 1000px) selon ton goût */
}

.section-alt .section-header p {
  max-width: none;    /* au cas où une règle future resserre le paragraphe */
}

/* Bloc contact */
.contact-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.contact-main .btn {
  margin-bottom: 0.75rem;
}

.contact-hint {
  font-size: 0.95rem;
  opacity: 0.85;
}

.contact-details p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.contact-details a {
  word-break: break-word;
}

/* Carte Coordonnées */
.contact-coords-card {
  margin-bottom: 2rem;
  padding: 1.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.contact-coords-head {
  margin-bottom: 1.25rem;
}

.contact-org {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0.2px;
}

.contact-tagline {
  margin: 0.35rem 0 0;
  opacity: 0.85;
  font-size: 1rem;
}

.contact-coords-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .contact-coords-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.contact-coords-item {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0,0,0,0.04);
}

.contact-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

.contact-value {
  font-size: 1rem;
  line-height: 1.45;
}

.contact-value a {
  text-decoration: none;
}

.contact-value a:hover {
  text-decoration: underline;
}

/* Bloc Nous écrire */
.contact-write-actions {
  margin-top: 1rem;
}

.contact-hint {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Galerie REx-Fluvius */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.image-grid figure {
  margin: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.06);
}

/* IMPORTANT: uniformiser le rendu */
.image-grid img {
  width: 100%;
  height: 210px;          /* hauteur fixe pour éviter les blocs énormes */
  object-fit: cover;      /* recadrage propre */
  display: block;
}

.image-grid figcaption {
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  color: #3c4858;
  line-height: 1.3;
}

/* Petit effet discret au survol */
.image-grid figure:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease;
}
