﻿/*
Theme Name: CREGE Modern
Theme URI: https://crege.org/
Author: CREGE
Description: Thème moderne pour le Centre de Recherche en Économie et Gestion.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.9
Text Domain: crege-modern
*/

:root {
  --ink: #10201d;
  --muted: #5f6f68;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --green: #0f7b5f;
  --teal: #0d9488;
  --gold: #d89a2b;
  --coral: #d85f4b;
  --line: rgba(16, 32, 29, 0.12);
  --shadow: 0 20px 60px rgba(16, 32, 29, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  left: 0;
  padding: 16px clamp(18px, 4vw, 64px);
  position: fixed;
  right: 0;
  top: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 30;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(16, 32, 29, 0.08);
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  align-items: center;
  display: inline-flex;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.brand-logo img {
  height: 50px;
  object-fit: contain;
  width: 50px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.74rem;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: 6px;
}

.main-nav a {
  color: #243832;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 9px 12px;
}

.main-nav a:hover {
  color: var(--green);
}

.main-nav a.is-active {
  color: var(--green);
}

.nav-toggle {
  background: transparent;
  border: 0;
  display: none;
  height: 40px;
  padding: 8px;
  width: 40px;
}

.nav-toggle span {
  background: var(--ink);
  display: block;
  height: 2px;
  margin: 5px 0;
  width: 24px;
}

.hero {
  align-items: end;
  background-image: url("https://crege.org/wp-content/uploads/2025/12/WhatsApp-Image-2025-12-17-at-21.21.00.jpeg");
  background-position: center;
  background-size: cover;
  color: #fff;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  min-height: 76vh;
  padding: 118px clamp(18px, 6vw, 84px) 48px;
  position: relative;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(9, 28, 24, 0.88), rgba(9, 28, 24, 0.55) 55%, rgba(9, 28, 24, 0.22));
  inset: 0;
  position: absolute;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.35rem, 5.2vw, 5rem);
  margin-bottom: 22px;
  max-width: 980px;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.03rem, 2vw, 1.28rem);
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
}

.button.primary {
  background: var(--gold);
  color: #1c1710;
}

.button.primary:hover {
  background: #efb64c;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.button.secondary.dark {
  border-color: var(--line);
  color: var(--green);
  margin-left: 6px;
}

.button.secondary.dark:hover {
  background: #edf7f1;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 24px;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.metrics {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.metrics article {
  border-right: 1px solid var(--line);
  padding: clamp(24px, 4vw, 44px);
}

.metrics article:last-child {
  border-right: 0;
}

.metrics strong {
  color: var(--green);
  display: block;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: clamp(64px, 9vw, 118px) clamp(18px, 6vw, 84px);
}

.page-hero {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: clamp(104px, 11vw, 140px) clamp(18px, 6vw, 84px) clamp(30px, 5vw, 54px);
}

.page-hero h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 4.5vw, 4.6rem);
  max-width: 980px;
}

.page-hero p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  max-width: 820px;
}

.page-hero + .section {
  padding-top: clamp(38px, 5vw, 64px);
}

.image-hero {
  align-items: end;
  display: grid;
  gap: clamp(30px, 6vw, 72px);
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.62fr);
}

.image-hero img {
  aspect-ratio: 1.05;
  object-fit: cover;
  width: 100%;
}

.portal-grid,
.content-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.portal-card,
.content-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(16, 32, 29, 0.07);
  display: block;
  padding: 24px;
}

.portal-card {
  min-height: 230px;
}

.portal-card:hover {
  border-color: rgba(15, 123, 95, 0.36);
  transform: translateY(-2px);
}

.portal-card span,
.content-card span {
  color: var(--coral);
  font-weight: 900;
  text-transform: uppercase;
}

.portal-card h3,
.content-card h3 {
  font-size: 1.32rem;
  line-height: 1.18;
  margin: 12px 0 0;
}

.content-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.split-section {
  align-items: start;
  background: #fff;
  display: grid;
  gap: clamp(28px, 6vw, 76px);
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
}

.list-panel,
.price-panel {
  background: #edf7f1;
  border-left: 4px solid var(--green);
  padding: clamp(22px, 4vw, 34px);
}

.list-panel ul {
  color: var(--muted);
  margin: 0;
  padding-left: 20px;
}

.list-panel li {
  margin-bottom: 10px;
}

.price-panel strong {
  color: var(--green);
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
}

.price-panel span {
  color: var(--coral);
  display: block;
  font-weight: 900;
  margin-bottom: 16px;
}

.price-panel p {
  color: var(--muted);
}

.contact-band {
  align-items: center;
  background: var(--green);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(44px, 7vw, 72px) clamp(18px, 6vw, 84px);
}

.contact-band h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.9rem, 3.4vw, 3.4rem);
  line-height: 1.08;
  margin: 0;
  max-width: 860px;
}

.contact-band .eyebrow {
  color: #ffe09d;
}

.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prototype-hero img {
  aspect-ratio: 1.35;
}

.prototype-grid .portal-card {
  min-height: 190px;
}

.portal-card p {
  color: var(--muted);
  margin: 12px 0 0;
}

.section-heading {
  max-width: 840px;
}

.section-heading h2,
.impact-copy h2,
.mtsa-copy h2,
.contact-copy h2,
.split-copy h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin-bottom: 18px;
}

.intro-grid,
.objective-grid {
  align-items: start;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.65fr);
  margin-top: 32px;
}

.objective-grid {
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.objective-card {
  background: #fff;
  border-top: 5px solid var(--green);
  box-shadow: 0 14px 36px rgba(16, 32, 29, 0.08);
  padding: 24px;
}

.objective-card span {
  color: var(--coral);
  font-weight: 900;
}

.objective-card h3 {
  font-size: 1.35rem;
  line-height: 1.18;
  margin: 8px 0 12px;
}

.objective-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  max-width: 760px;
}

.feature-list {
  display: grid;
  gap: 10px;
}

.feature-list span {
  background: #edf7f1;
  border-left: 4px solid var(--green);
  color: #193c34;
  font-weight: 800;
  padding: 14px 16px;
}

.service-section {
  background: #f2f5ef;
}

.service-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
}

.service-grid.detailed {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card {
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(16, 32, 29, 0.08);
  min-width: 0;
}

.service-card img {
  aspect-ratio: 1.34;
  object-fit: cover;
  width: 100%;
}

.service-card div {
  padding: 24px;
}

.service-card span {
  color: var(--coral);
  font-weight: 800;
}

.service-card h3,
.publication-card h3,
.news-item h3,
.objective-card h3,
.timeline h3 {
  font-size: 1.35rem;
  line-height: 1.18;
  margin: 8px 0 12px;
}

.service-card p,
.publication-card p,
.news-item p,
.timeline p,
.impact-copy p,
.mtsa-copy p,
.contact-copy p {
  color: var(--muted);
}

.service-card a {
  color: var(--green);
  display: inline-block;
  font-weight: 800;
  margin-top: 8px;
}

.impact-section {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
}

.cad-section {
  background: #fff;
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
}

.cad-copy,
.split-copy {
  max-width: 860px;
}

.cad-copy h2,
.split-copy h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

.cad-copy p,
.split-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 760px;
}

.cad-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.cad-card {
  background: #edf7f1;
  border-left: 4px solid var(--green);
  padding: 24px;
}

.cad-card span {
  color: var(--coral);
  font-weight: 900;
}

.cad-card h3 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 8px 0 10px;
}

.cad-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.program-card {
  background: #edf7f1;
  display: grid;
  grid-template-columns: minmax(200px, 0.72fr) minmax(0, 1fr);
}

.program-card img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.program-card div {
  padding: clamp(22px, 4vw, 34px);
}

.program-card h3 {
  font-size: 1.45rem;
  line-height: 1.18;
  margin-bottom: 16px;
}

.program-card ul {
  color: var(--muted);
  margin: 0 0 22px;
  padding-left: 20px;
}

.program-card li {
  margin-bottom: 8px;
}

.impact-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 18px;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 20px;
}

.timeline span {
  align-items: center;
  background: var(--gold);
  color: #1c1710;
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.timeline h3 {
  color: #fff;
}

.timeline p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 24px;
}

.filter-tabs button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 42px;
  padding: 9px 14px;
}

.filter-tabs button.active {
  background: var(--green);
  color: #fff;
}

.publication-grid,
.news-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.publication-grid.rich,
.news-grid.rich {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.publication-card,
.news-item,
.document-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.publication-card.is-hidden {
  display: none;
}

.publication-card span {
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
}

.document-grid,
.media-grid {
  display: grid;
  gap: 18px;
}

.document-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-card span {
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
}

.document-card h3 {
  font-size: 1.2rem;
  line-height: 1.22;
  margin: 10px 0 18px;
}

.media-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 32px;
}

.media-tile {
  background: #fff;
  border: 1px solid var(--line);
  margin: 0;
}

.media-tile img {
  aspect-ratio: 1.15;
  object-fit: cover;
  width: 100%;
}

.media-tile figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px;
  word-break: break-word;
}

.library-section {
  background: #fff;
}

.library-strip {
  align-items: start;
  background: var(--ink);
  color: #fff;
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
  padding: clamp(24px, 5vw, 44px);
}

.library-strip p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  margin: 0;
}

.mtsa-section {
  align-items: center;
  background: #fff;
  display: grid;
  gap: clamp(30px, 6vw, 76px);
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
}

.mtsa-media img {
  aspect-ratio: 1.1;
  object-fit: cover;
  width: 100%;
}

.note-box {
  background: #edf7f1;
  border-left: 4px solid var(--green);
  color: var(--ink);
  display: grid;
  gap: 4px;
  margin: 18px 0 22px;
  padding: 16px;
}

.note-box strong {
  font-weight: 900;
}

.note-box span {
  color: var(--muted);
}

.news-section {
  background: #f2f5ef;
}

.news-item time {
  color: var(--coral);
  font-weight: 900;
}

.contact-section {
  align-items: start;
  background: var(--green);
  color: #fff;
  display: grid;
  gap: clamp(32px, 7vw, 90px);
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  padding: clamp(64px, 9vw, 118px) clamp(18px, 6vw, 84px);
}

.page-contact {
  min-height: 100vh;
  padding-top: clamp(130px, 14vw, 190px);
}

.contact-copy h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(2.2rem, 4.6vw, 4.8rem);
  line-height: 1.05;
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.contact-methods span,
.contact-methods a {
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-weight: 800;
  padding: 8px 12px;
}

.contact-section .eyebrow {
  color: #ffe09d;
}

.contact-form {
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 14px;
  padding: clamp(20px, 4vw, 34px);
}

.contact-form label {
  color: #33443f;
  display: grid;
  font-weight: 800;
  gap: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 11px 12px;
  width: 100%;
}

.contact-form textarea {
  resize: vertical;
}

.site-footer {
  align-items: center;
  background: #101713;
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding: 28px clamp(18px, 6vw, 84px);
}

.site-footer p {
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .intro-grid,
  .objective-grid,
  .portal-grid,
  .content-grid,
  .image-hero,
  .split-section,
  .impact-section,
  .cad-section,
  .mtsa-section,
  .contact-section,
  .contact-band,
  .compact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 78vh;
  }

  .service-grid,
  .service-grid.detailed,
  .cad-grid,
  .publication-grid,
  .publication-grid.rich,
  .document-grid,
  .media-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-grid.rich,
  .program-card {
    grid-template-columns: 1fr;
  }

  .program-card img {
    aspect-ratio: 1.25;
    height: auto;
  }

  .library-strip {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .contact-band .button {
    justify-self: start;
  }

  .metrics article {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .metrics article:last-child {
    border-bottom: 0;
  }
}

@media (min-width: 981px) and (max-height: 760px) {
  .hero {
    align-items: center;
    min-height: 66vh;
    padding-bottom: 32px;
  }

  h1 {
    font-size: clamp(2.2rem, 4.4vw, 4.2rem);
    margin-bottom: 16px;
  }

  .hero-copy {
    font-size: 1.04rem;
    max-width: 640px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-panel {
    padding: 18px;
  }

  .hero-panel strong {
    font-size: 1.42rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    padding: 12px 18px;
  }

  .brand small {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    left: 0;
    padding: 12px 18px 18px;
    position: absolute;
    right: 0;
    top: 67px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
  }

  .hero {
    gap: 18px;
    min-height: auto;
    padding-bottom: 28px;
    padding-top: 96px;
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 14px;
  }

  .hero-copy {
    font-size: 0.98rem;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-panel {
    padding: 16px;
  }

  .hero-panel strong {
    font-size: 1.22rem;
  }

  .hero-actions,
  .contact-band,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .timeline article {
    grid-template-columns: 1fr;
  }
}
