/* ============================================
   rencontre-etudiante.fr — Campus aurore
   Palette : clémentine + bleu campus + crème
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600;700&family=Caveat:wght@400;600&display=swap');

:root {
  /* Couleurs principales */
  --clementine: #FFB347;
  --bleu-campus: #2A5C9E;
  --creme: #FFF8E7;
  --encre: #1C1F2E;
  --papier: #E8E2D0;

  /* Dérivés clémentine */
  --clementine-95: rgba(255, 179, 71, 0.95);
  --clementine-80: rgba(255, 179, 71, 0.80);
  --clementine-40: rgba(255, 179, 71, 0.40);
  --clementine-15: rgba(255, 179, 71, 0.15);

  /* Dérivés bleu campus */
  --bleu-95: rgba(42, 92, 158, 0.95);
  --bleu-80: rgba(42, 92, 158, 0.80);
  --bleu-40: rgba(42, 92, 158, 0.40);
  --bleu-15: rgba(42, 92, 158, 0.15);

  /* Dérivés encre */
  --encre-90: rgba(28, 31, 46, 0.90);
  --encre-75: rgba(28, 31, 46, 0.75);
  --encre-50: rgba(28, 31, 46, 0.50);
  --encre-25: rgba(28, 31, 46, 0.25);
  --encre-10: rgba(28, 31, 46, 0.10);
  --encre-05: rgba(28, 31, 46, 0.05);

  /* Polices */
  --ff-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ff-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ff-quote: 'Caveat', 'Brush Script MT', cursive;

  /* Mesures */
  --measure-article: 700px;
  --measure-wide: 1280px;
  --measure-hero: 1440px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 300ms;
  --dur: 500ms;
  --dur-slow: 700ms;

  /* Ombres */
  --shadow-card: 0 4px 16px rgba(28, 31, 46, 0.08);
  --shadow-hover: 0 12px 32px rgba(28, 31, 46, 0.16);
}

/* ============================================
   RESET + BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--encre);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--bleu-campus);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--clementine); }

/* ============================================
   TYPOGRAPHIE
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--encre);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 2.5em 0 0.8em; position: relative; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); margin: 2em 0 0.6em; }
h4 { font-size: 1.15rem; margin: 1.5em 0 0.5em; }

/* Filet décoratif sous H2 */
h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--clementine);
  margin-top: 0.3em;
  border-radius: 2px;
  transform-origin: left;
  animation: filetGrow var(--dur) var(--ease) forwards;
}
@keyframes filetGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

p { margin-bottom: 1.2em; }
strong { color: var(--encre); font-weight: 600; }
em { font-style: italic; }

blockquote {
  border-left: 3px solid var(--clementine);
  padding-left: 1.5rem;
  margin: 2em 0;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--encre-90);
}

.kicker {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bleu-campus);
  margin-bottom: 0.8em;
}

.lettrine::first-letter {
  font-family: var(--ff-display);
  font-size: 3.8em;
  font-weight: 700;
  float: left;
  line-height: 0.9;
  padding: 0.1em 0.15em 0 0;
  color: var(--clementine);
}

/* Citation manuscrite Caveat */
.note-manuscrite {
  font-family: var(--ff-quote);
  font-size: 1.5rem;
  color: var(--bleu-campus);
  transform: rotate(-1.5deg);
  display: inline-block;
}

/* ============================================
   LAYOUT
   ============================================ */

.container { max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--gutter); }
.container-article { max-width: var(--measure-article); margin: 0 auto; padding: 0 var(--gutter); }
.container-hero { max-width: var(--measure-hero); margin: 0 auto; padding: 0 var(--gutter); }

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 231, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--encre-05);
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.site-header.scrolled {
  background: rgba(255, 248, 231, 0.98);
  box-shadow: 0 2px 12px var(--encre-05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.site-logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--encre);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-logo::before {
  content: '';
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--clementine), var(--bleu-campus));
  border-radius: 50%;
  display: inline-block;
}

.main-nav { display: flex; gap: 1.8rem; align-items: center; }
.main-nav a {
  color: var(--encre);
  font-weight: 500;
  font-size: 0.96rem;
  transition: color var(--dur-fast) var(--ease);
  position: relative;
}
.main-nav a:hover { color: var(--bleu-campus); }
.main-nav a.active { color: var(--bleu-campus); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--clementine);
  border-radius: 2px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--encre);
  margin: 5px 0;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--creme);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    box-shadow: -8px 0 32px var(--encre-10);
  }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
  body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--clementine-15), var(--bleu-15));
  overflow: hidden;
  padding: 4rem 0;
}
.hero-home { min-height: 88vh; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--measure-hero);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.hero-kicker {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bleu-campus);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.2rem;
  max-width: 24ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--clementine);
  font-weight: 500;
}

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 56ch;
  color: var(--encre-90);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.6rem;
  font-family: var(--ff-body);
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--dur-fast) var(--ease);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--encre); color: var(--creme); }
.btn-primary:hover { background: var(--bleu-campus); color: var(--creme); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--encre); border: 2px solid var(--encre); }
.btn-secondary:hover { background: var(--encre); color: var(--creme); }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-body);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--encre-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-indicator::after {
  content: '';
  width: 1px;
  height: 30px;
  background: var(--encre-25);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.5); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============================================
   SECTIONS & CARDS
   ============================================ */

.section { padding: 5rem 0; }
.section-alt { background: var(--papier); }

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}
.section-header .kicker { display: block; margin-bottom: 0.8em; }
.section-header h2 {
  margin: 0 auto;
  max-width: 24ch;
}
.section-header h2::after { margin: 0.3em auto 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--creme);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--papier);
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform var(--dur) var(--ease);
}
.card:hover .card-image img { transform: scale(1.04); }

.card-body { padding: 1.3rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clementine);
  margin-bottom: 0.5em;
}
.card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5em;
  color: var(--encre);
}
.card p {
  font-size: 0.94rem;
  color: var(--encre-75);
  margin-bottom: 0;
  flex: 1;
}
.card-date {
  font-size: 0.82rem;
  color: var(--encre-50);
  margin-top: 1em;
}

/* Asymetric grid for piliers */
.piliers-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}
.pilier-card { grid-column: span 6; }
.pilier-card.tall { grid-column: span 6; aspect-ratio: 3/4; }
.pilier-card.wide { grid-column: span 12; aspect-ratio: 16/7; }
@media (max-width: 768px) {
  .pilier-card, .pilier-card.tall, .pilier-card.wide { grid-column: span 12; aspect-ratio: 3/2; }
}

/* ============================================
   ARTICLE BODY
   ============================================ */

.article-summary {
  max-width: var(--measure-article);
  margin: 3rem auto 2rem;
  padding: 0 var(--gutter);
  font-family: var(--ff-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic;
  color: var(--encre-90);
  line-height: 1.5;
  text-align: center;
}

.article-meta {
  max-width: var(--measure-article);
  margin: 0 auto 2rem;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: 0.86rem;
  color: var(--encre-50);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.article-meta time { color: var(--bleu-campus); }
.article-meta .meta-sep { color: var(--encre-25); }

.article-body {
  max-width: var(--measure-article);
  margin: 2rem auto;
  padding: 0 var(--gutter);
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body p { margin-bottom: 1.3em; color: var(--encre-90); }
.article-body p:first-of-type { font-size: 1.12rem; }
.article-body ul, .article-body ol { margin: 1.3em 0 1.3em 1.5em; }
.article-body li { margin-bottom: 0.6em; color: var(--encre-90); }
.article-body img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
  margin: 2.5em 0;
  box-shadow: var(--shadow-card);
}
.article-body a {
  color: var(--bleu-campus);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--clementine);
}
.article-body a:hover {
  color: var(--clementine);
  text-decoration-color: var(--bleu-campus);
}

/* TOC */
.toc {
  background: var(--papier);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0 3rem;
}
.toc-title {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bleu-campus);
  margin-bottom: 1em;
}
.toc ol { list-style: none; counter-reset: toc-counter; padding: 0; margin: 0; }
.toc li {
  counter-increment: toc-counter;
  padding: 0.4em 0;
  font-size: 0.94rem;
}
.toc li::before {
  content: counter(toc-counter, decimal-leading-zero) ' ';
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--clementine);
  margin-right: 0.5em;
}
.toc a { color: var(--encre-90); }
.toc a:hover { color: var(--bleu-campus); }

/* ============================================
   FAQ
   ============================================ */

.faq-section { padding: 3rem 0; }
.faq-list { max-width: var(--measure-article); margin: 0 auto; padding: 0 var(--gutter); }
.faq-item {
  border-top: 1px solid var(--encre-10);
  padding: 1.2rem 0;
  cursor: pointer;
}
.faq-item:last-child { border-bottom: 1px solid var(--encre-10); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--encre);
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-toggle {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: 1.8rem;
  color: var(--clementine);
  transition: transform var(--dur-fast) var(--ease);
  line-height: 1;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--encre-75);
  line-height: 1.7;
  display: none;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================
   RELATED + LINKS
   ============================================ */

.related {
  background: var(--papier);
  padding: 4rem 0;
  margin-top: 4rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--encre);
  color: var(--creme);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
.footer-brand h3 {
  font-family: var(--ff-display);
  color: var(--creme);
  font-size: 1.4rem;
  margin-bottom: 0.5em;
}
.footer-tagline {
  color: var(--clementine);
  font-family: var(--ff-quote);
  font-size: 1.3rem;
  margin-bottom: 1.2em;
}
.footer-desc { color: rgba(255, 248, 231, 0.7); font-size: 0.94rem; }
.footer-col h4 {
  color: var(--clementine);
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6em; }
.footer-col a {
  color: rgba(255, 248, 231, 0.75);
  font-size: 0.94rem;
  transition: color var(--dur-fast) var(--ease);
}
.footer-col a:hover { color: var(--clementine); }
.footer-bottom {
  border-top: 1px solid rgba(255, 248, 231, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255, 248, 231, 0.5);
}
.footer-bottom p { margin-bottom: 0.5em; }

/* ============================================
   PAGES UTILITAIRES
   ============================================ */

.utility-page {
  max-width: var(--measure-article);
  margin: 0 auto;
  padding: 4rem var(--gutter);
}
.utility-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.utility-page h2 { margin-top: 2.5em; }
.utility-page .lead {
  font-size: 1.15rem;
  color: var(--encre-75);
  margin-bottom: 2em;
}

.contact-email {
  background: var(--clementine-15);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
}
.contact-email .btn {
  font-size: 1.05rem;
  padding: 1rem 2rem;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   404 + UTILS
   ============================================ */

.not-found {
  text-align: center;
  padding: 5rem 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.not-found h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--clementine);
}
.not-found p { max-width: 38ch; color: var(--encre-75); margin: 1.5em auto 2em; }

/* Print */
@media print {
  .site-header, .site-footer, .related, .faq-section, .hero-bg { display: none !important; }
  body { background: white; color: black; }
  .article-body img { box-shadow: none; }
}
