/* ================================================================
   style.css — Professeur Patrice Hardouin
================================================================ */

/* ─── Polices auto-hébergées (SIL Open Font License) ────────── */
@font-face {
  font-family: 'Libre Baskerville';
  src: url('../fonts/LibreBaskerville-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Baskerville';
  src: url('../fonts/LibreBaskerville-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Baskerville';
  src: url('../fonts/LibreBaskerville-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/SourceSans3-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/SourceSans3-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/SourceSans3-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/SourceSans3-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Variables ──────────────────────────────────────────────── */
:root {
  --vert-profond:   #1a4731;
  --vert-vif:       #2ecc71;
  --vert-sombre:    #27ae60;
  --vert-pale:      #eaf7ef;
  --encre:          #1c1c1c;
  --gris-chaud:     #f5f4f0;
  --blanc:          #ffffff;
  --transition:     all 0.3s ease;
}

/* ─── Base ───────────────────────────────────────────────────── */
body {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  background-color: var(--gris-chaud);
  color: var(--encre);
  scroll-behavior: smooth;
}

h1, h2, h3, h4 {
  font-family: 'Libre Baskerville', Georgia, serif;
}

section { position: relative; }

.section-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--vert-vif), transparent);
}

/* ─── Titres de section ──────────────────────────────────────── */
.section-heading {
  font-family: 'Libre Baskerville', serif;
  color: var(--vert-profond);
  border-bottom: 2px solid var(--vert-vif);
  padding-bottom: .6rem;
  margin-bottom: 2rem;
  font-size: 1.7rem;
}

/* ─── Parallax ───────────────────────────────────────────────── */
.parallax-section {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
  min-height: 420px;
  overflow: hidden;
}
.overlay {
  position: absolute; inset: 0;
  background: rgba(10, 35, 20, 0.55);
  backdrop-filter: blur(2px);
}
.content-wrapper { position: relative; z-index: 1; }

/* Chemins corrigés : le CSS est dans css/, les images dans images/ */
#presentation { background-image: url("../images/foret.png"); }
#publications  { background-image: url("../images/cycle_eau.png"); }

@media (max-width: 768px) {
  .parallax-section { background-attachment: scroll; }
}

/* ─── Cartes génériques ──────────────────────────────────────── */
.carte {
  border: none;
  border-radius: .75rem;
  background: var(--blanc);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: var(--transition);
  height: 100%;
}
.carte:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(46,204,113,.14);
}
.carte .icone {
  width: 48px; height: 48px;
  background: var(--vert-profond);
  color: var(--blanc);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ─── Cartes parcours ────────────────────────────────────────── */
.parcours-card {
  border-radius: .75rem;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.parcours-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.parcours-card .card-header {
  background-color: var(--vert-profond);
  color: var(--blanc);
  font-family: 'Libre Baskerville', serif;
  padding: 1rem 1.25rem;
}

/* ─── Témoignages ────────────────────────────────────────────── */
.temoignage {
  background: var(--blanc);
  border-left: 4px solid var(--vert-vif);
  border-radius: 0 .5rem .5rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 1.5rem;
}
.avatar-initiales {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--vert-profond);
  color: var(--blanc);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  font-family: 'Libre Baskerville', serif;
  flex-shrink: 0;
}
.avatar-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ─── Publications ───────────────────────────────────────────── */
.publication-card {
  background: var(--vert-pale);
  border-radius: .75rem;
  transition: var(--transition);
  border: 1px solid rgba(46,204,113,.25);
}
.publication-card h4,
.publication-card p {
  color: var(--vert-profond) !important;
}
.publication-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(46,204,113,.2);
}

/* ─── Encart ingénierie pédagogique ──────────────────────────── */
.encart-expertise {
  background: var(--vert-profond);
  color: var(--blanc);
  border-radius: .75rem;
  padding: 2.5rem 2rem;
}
.encart-expertise h3 {
  font-family: 'Libre Baskerville', serif;
  color: var(--vert-vif);
  margin-bottom: 1rem;
}
.encart-expertise p {
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: .92;
}

/* ─── Bulle contact ──────────────────────────────────────────── */
.bulle-contact {
  background: var(--vert-profond);
  border-radius: 1rem;
  padding: 1.75rem;
  color: var(--blanc);
  animation: flottement 6s ease-in-out infinite;
}
@keyframes flottement {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ─── Bouton principal ───────────────────────────────────────── */
.btn-principal {
  background: var(--vert-profond);
  border-color: var(--vert-profond);
  color: var(--blanc);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  letter-spacing: .03em;
  transition: var(--transition);
  padding: .65rem 1.6rem;
}
.btn-principal:hover {
  background: var(--vert-sombre);
  border-color: var(--vert-sombre);
  color: var(--blanc);
  transform: scale(1.04);
}
.btn-outline-principal {
  border: 2px solid var(--vert-vif);
  color: var(--vert-profond);
  font-weight: 600;
  transition: var(--transition);
  padding: .55rem 1.4rem;
}
.btn-outline-principal:hover {
  background: var(--vert-vif);
  color: var(--blanc);
}

/* ─── Logo flottant ──────────────────────────────────────────── */
.logo-flottant {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 1000;
  transition: transform .3s;
}
.logo-flottant:hover { transform: scale(1.1); }
.logo-flottant img { max-width: 58px; height: auto; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .logo-pph { display: none; }
}

/* ─── Utilitaires ────────────────────────────────────────────── */
.bg-vert-pale  { background-color: var(--vert-pale); }
.bg-gris-chaud { background-color: var(--gris-chaud); }
.text-vert-profond { color: var(--vert-profond) !important; }
.text-vert-vif     { color: var(--vert-vif) !important; }
