
/* =====================================================
   1. VARIABLES ET THEMES
===================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --text: #1a1d23;
  --text-muted: #5b6270;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e3e6eb;

  --radius: 12px;
  --max-width: 1040px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-alt: #171a21;
  --text: #eef0f4;
  --text-muted: #a0a7b4;
  --accent: #5b8def;
  --accent-hover: #7aa3f5;
  --border: #272b34;
}

/* =====================================================
   2. BASE
===================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color 0.25s, color 0.25s;
}

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

a:hover {
  color: var(--accent-hover);
}

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

button {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

/* =====================================================
   3. EN-TETE ET NAVIGATION
===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo i {
  color: var(--accent);
  font-size: 1.3rem;
}

.logo span {
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;
  border-radius: 10px;

  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav a.active {
  background: var(--accent);
  color: #ffffff;
}

.header-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* Bouton du thème */

.theme-toggle,
.menu-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
}

.theme-toggle i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;

  font-size: 0.85rem;
  color: var(--text-muted);
}

[data-theme="light"] .theme-toggle .fa-sun,
[data-theme="dark"] .theme-toggle .fa-moon {
  background: var(--accent);
  color: #ffffff;
}

/* Menu mobile */

.menu-toggle {
  display: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 1rem;
}

/* =====================================================
   4. SELECTEUR DE LANGUE
===================================================== */

.lang {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;

  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;

  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn .fa-chevron-down {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;

  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.lang.open .lang-menu {
  display: block;
}

.lang-menu button {
  width: 100%;
  text-align: left;

  background: none;
  border: none;
  color: var(--text);

  padding: 10px 12px;
  border-radius: 8px;

  font-size: 0.95rem;
  cursor: pointer;
}

.lang-menu button:hover {
  background: var(--bg-alt);
}

.lang-menu button.active {
  color: var(--accent);
  font-weight: 700;
}

/* =====================================================
   5. HERO - SECTION PRINCIPALE
===================================================== */

.hero-photo {
  padding: 0;
  overflow: hidden;

  background: linear-gradient(135deg, #0b1220 0%, #12203a 100%);
}

[data-theme="light"] .hero-photo {
  background: linear-gradient(135deg, #eaf1ff 0%, #dbe7ff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 24px;
  min-height: 420px;
}

.hero-content {
  padding: 40px 0;
}

.hero-field,
.hero-tag {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-photo h1,
.hero h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.highlight {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-photo .hero-text,
.hero-text {
  max-width: 620px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Photo */

.hero-media {
  position: relative;
  align-self: stretch;

  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-media img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: top;

  -webkit-mask-image: linear-gradient(to right, transparent, #000 25%);
  mask-image: linear-gradient(to right, transparent, #000 25%);
}

.hero-slogan {
  position: absolute;
  top: 36px;
  right: 0;

  max-width: 240px;
  text-align: center;

  font-family: "Dancing Script", cursive;
  font-size: 1.7rem;
  line-height: 1.2;

  transform: rotate(-6deg);
  color: var(--text);
}

/* =====================================================
   6. BOUTONS
===================================================== */

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;

  font-weight: 600;
  transition: transform 0.15s, background-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.btn i {
  margin-right: 6px;
}

/* =====================================================
   7. RESEAUX SOCIAUX
===================================================== */

.socials {
  display: flex;
  gap: 20px;
  margin-top: 28px;
}

.socials a {
  color: var(--text);
  font-size: 1.5rem;
  transition: color 0.2s, transform 0.2s;
}

.socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* =====================================================
   8. SECTIONS
===================================================== */

.section {
  padding: 72px 0;
}

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

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.section-text {
  max-width: 680px;
  color: var(--text-muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin-bottom: 0;
}

.link-more {
  font-weight: 600;
}

/* =====================================================
   9. CARTES ET GRILLES
===================================================== */

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

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;

  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
}

.card-date {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

/* =====================================================
   10. PIED DE PAGE
===================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.site-footer h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.copyright {
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =====================================================
   11. RESPONSIVE - TABLETTES ET MOBILES
===================================================== */

@media (max-width: 900px) {
  .header-inner {
    gap: 10px;
  }

  .nav a {
    padding: 8px;
    font-size: 0.85rem;
  }

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

@media (max-width: 720px) {
  .header-inner {
    position: relative;
  }

  .logo {
    flex: 1;
  }

  .logo span {
    font-size: 0.95rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;

    flex-direction: column;
    align-items: flex-start;
    gap: 8px;

    padding: 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .header-actions {
    gap: 6px;
  }

  .lang-btn {
    padding: 7px 10px;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 40px 0 0;
  }

  .hero-media {
    min-height: 280px;
  }

  .hero-media img {
    max-height: 340px;
    object-position: top;
  }

  .hero-slogan {
    font-size: 1.3rem;
    top: 16px;
  }

  .section {
    padding: 56px 0;
  }
}

@media (max-width: 420px) {
  .header-inner {
    padding: 0 12px;
    gap: 6px;
  }

  .logo {
    font-size: 0.9rem;
  }

  .logo span {
    font-size: 0.85rem;
  }

  .header-actions {
    gap: 5px;
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .theme-toggle i {
    width: 25px;
    height: 25px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

/* =====================================================
   12. ACCESSIBILITE
===================================================== */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =====================================================
   13. SECTION EN BREF
===================================================== */

.brief {
  padding: 48px 0;
  background: var(--bg);
}

.brief-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.brief-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;

  padding: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brief-card > i {
  font-size: 1.35rem;
  margin-top: 3px;
}

.brief-card h3 {
  font-size: 0.98rem;
  margin-bottom: 5px;
}

.brief-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.icon-blue {
  color: var(--accent);
}

.icon-yellow {
  color: #d69e22;
}

/* =====================================================
   14. IMAGES DES CARTES
===================================================== */

.card-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 18px;
}

/* Adaptation de la section En bref */

@media (max-width: 900px) {
  .brief-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .card-image {
    height: 180px;
  }
}

/* =====================================================
   15. PIED DE PAGE (BARRE ET RETOUR EN HAUT)
===================================================== */

.site-footer { padding: 56px 0 0; }

.footer-bar {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

.footer-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer .copyright { margin-top: 0; }

.footer-motto {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--accent); }

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.2s;
}

.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--accent-hover); transform: translateY(-3px); }

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

/* =====================================================
   16. MENU MOBILE ÉTENDU (écrans < 1060 px)
   Évite que l'en-tête déborde sur tablettes et petits portables
===================================================== */

@media (max-width: 1060px) {
  .header-inner { position: relative; }
  .logo { flex: 1; }
  .menu-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }

  .nav.open { display: flex; }

  .nav a {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
  }
}
