/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =============================================
   DESIGN TOKENS & RESET
============================================= */
:root {
  --blue: #0D2340;
  --blue-mid: #1A3A60;
  --blue-light: #E8EFF7;
  --accent: #E8A020;
  --accent-light: #FDF3E3;
  --green: #2E7D5A;
  --green-light: rgba(46,125,90,0.12);
  --purple: #6B4FA3;
  --purple-light: rgba(107,79,163,0.12);
  --text: #1A1A2E;
  --text-mid: #4A4A6A;
  --text-light: #8888AA;
  --white: #FAFBFD;
  --border: #E2E8F0;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --max-w: 1100px;
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: 7rem;
  --radius: 4px;
  --radius-m: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   UTILITIES
============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.section-label {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.7; }

img { max-width: 100%; display: block; }

/* =============================================
   HEADER / NAV
============================================= */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem var(--space-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250,251,253,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--blue);
  letter-spacing: 0.01em;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
nav a:hover { color: var(--blue); opacity: 1; }

.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.78rem !important;
}
.nav-cta:hover { opacity: 0.85 !important; }

/* =============================================
   SECTION 1 — HERO
============================================= */
#hero {
  padding-top: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Subtle background geometry */
#hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 55%;
  height: 110%;
  background: var(--blue-light);
  clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.hero-content {}

.hero-eyebrow {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  color: var(--blue);
  line-height: 1.0;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-mid);
  font-weight: 400;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 420px;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--blue-mid);
  margin-bottom: 2.5rem;
  max-width: 400px;
  line-height: 1.45;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.hero-scroll svg {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.hero-photo {
  position: relative;
}

.hero-photo-wrap {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 2/3; 
  background: var(--blue-light);
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 12px 12px 0 var(--accent);
}

.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder when no photo */
.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
}

.photo-placeholder span {
  font-family: var(--font-display);
  font-size: 5rem;
  color: rgba(255,255,255,0.15);
  letter-spacing: -0.02em;
}

.hero-photo-badge {
  position: absolute;
  bottom: -1rem;
  left: -1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1rem 1.4rem;
  box-shadow: 0 8px 32px rgba(13,35,64,0.12);
}

.hero-photo-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--blue);
  line-height: 1;
}

.hero-photo-badge span {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

/* =============================================
   SECTION 2 — À PROPOS
============================================= */
#about {
  padding: var(--space-xl) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.about-left {}

.about-facts {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.about-fact strong {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.about-fact span {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 400;
}

.about-right p {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.about-right p:last-child { margin-bottom: 0; }

/* =============================================
   DIVIDER
============================================= */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* =============================================
   SECTION 3 — PROJETS
============================================= */
#projects {
  padding: var(--space-xl) 0;
  background: var(--blue-light);
}

.projects-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
  margin-bottom: 4rem;
}

/* Pillar cards */
.pillars {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.pillar {
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 2.5rem;
  border: 1px solid var(--border);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  background: var(--blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pillar-icon svg { fill: var(--white); }

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 0.6rem;
}

.pillar p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.pillar-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Media grid */
.media-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.media-group-title {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.media-group-title--spaced {
  margin-top: 3rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.media-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.media-card:hover {
  box-shadow: 0 6px 24px rgba(13,35,64,0.1);
  transform: translateY(-2px);
}

.media-dot {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.media-dot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-dot span {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: bold;
}

.media-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.3;
}

.media-card a {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.media-label {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 20px;
  line-height: 1;
  backdrop-filter: blur(4px);
}

/* Univers B2B */
.media-label-b2b {
  background: rgba(13,35,64,0.08);
  color: var(--blue);
}

/* Univers Sport */
.media-label-sport {
  background: rgba(232,160,32,0.12);
  color: var(--accent);
}

/* Univers Habitat */
.media-label-habitat {
  background: var(--green-light);
  color: var(--green);
}

/* Voyage */
.media-label-personal {
  background: var(--purple-light);
  color: var(--purple);
}

/* =============================================
   SECTION 4 — AUTEUR
============================================= */
#author {
  padding: var(--space-xl) 0;
}

.author-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 5rem;
  align-items: start;
}

.book-cover {
  position: relative;
}

.book-image-wrap {
  max-width: 320px; /* adapte si besoin */
  margin: 0 auto;
}

.book-image-wrap img {
  width: 100%;
  height: auto; /* IMPORTANT : pas de height forcé */
  display: block;
  border-radius: var(--radius-m);
  box-shadow: 12px 12px 0 var(--accent);
}

.book-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.book-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  line-height: 1.3;
}

.book-publisher {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 1rem;
}

.author-content {}

.author-content p {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.author-link {
  margin-top: 1rem;
  display: inline-flex;
}

/* =============================================
   SECTION 5 — ENSEIGNEMENT
============================================= */
#teaching {
  padding: var(--space-xl) 0;
  background: var(--blue);
}

#teaching .section-label { color: var(--accent); }
#teaching .section-title { color: var(--white); }

.teaching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.teaching-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-m);
  padding: 2.5rem;
}

.teaching-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.teaching-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}

.teaching-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* =============================================
   FOOTER
============================================= */

.site-footer {
  background: var(--blue);
  padding: 2rem 0;
}

.footer-inner-simple {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-m);
  text-align: center;
}

.site-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--white);
  font-weight: 500;
  margin-left: 0.4rem;
}

.site-footer a:hover {
  opacity: 0.8;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  header {
    display: none;
  }

  #hero {
    padding-top: 2rem; 
  }

  #hero::before {
    display: none;
  }

  .hero-tagline, .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-scroll { justify-content: center; }

  .hero-photo-badge {
    left: 50%;
    transform: translateX(-50%);
    bottom: -2rem;
    white-space: nowrap;
  }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }

  .pillars { grid-template-columns: 1fr; }

  .author-grid { grid-template-columns: 1fr; }
  .book-visual { max-width: 250px; margin: 0 auto; }

  .teaching-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; }

/* Mobile hero: avoid cropped photo + badge overlap */
#hero{
  padding-bottom: 3rem;
  min-height: auto;
}

.hero-photo-wrap{
  max-width: 340px;
  aspect-ratio: 2 / 3;
}

.hero-photo-wrap img{
  object-position: center top;
}

.hero-photo-badge{
  position: static;
  transform: none;
  margin: 1rem auto 0;
  width: fit-content;
  white-space: nowrap;
}
}

@media (max-width: 600px) {
  :root { --space-l: 2.5rem; --space-xl: 4rem; }

  nav { display: none; }

  .hero-name { font-size: clamp(2.5rem, 12vw, 3.5rem); }

  .media-grid { grid-template-columns: 1fr 1fr; }

/* Media cards: swipe slider (native, no JS) */
.media-grid{
  display:flex;
  gap:0.9rem;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding:0.25rem 0.25rem 1rem;
  scroll-padding-left:0.25rem;
}

.media-grid::-webkit-scrollbar{display:none;}

.media-card{
  flex:0 0 78%;
  scroll-snap-align:start;
  min-width:260px;
  max-width:320px;
  min-height:150px;
}
}

/* =============================================
   FADE IN ANIMATION
============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Override: make favicon fill the dot (cropped) */
.media-dot{overflow:hidden;}
.media-dot img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;}



/* =========================================================
   MEDIA GRID — Desktop: 4 columns (balanced layout)
========================================================= */
@media (min-width: 901px) {
  .media-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Make the whole media card clickable (when media-card is an <a>) */
.media-card{
  text-decoration: none;
  color: inherit;
}

.media-card:hover{
  opacity: 1; /* prevents global a:hover opacity from fading the whole card */
}

.media-link{
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* =========================================================
   MOBILE SWIPE HINT — show there's more to the right
========================================================= */
@media (max-width: 600px) {
  .media-section{
    position: relative;
  }

  /* right-side fade cue */
  .media-section::after{
    content: "";
    position: absolute;
    right: 0;
    top: 3.2rem; /* below the group title */
    height: 190px; /* covers cards area */
    width: 48px;
    pointer-events: none;
    background: linear-gradient(to left, var(--blue-light), rgba(232,239,247,0));
  }

  /* ensure we can see a "peek" of next card */
  .media-grid{
    padding-right: 3rem; /* makes room so next card is visible */
  }

  .media-card{
    flex: 0 0 82%; /* slightly smaller => clearer peek */
    min-width: 240px;
    max-width: 320px;
  }
}
