/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-heading: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Lora', Georgia, serif;

  --c-dark:   #12202f;
  --c-mid:    #1e3352;
  --c-gold:   #c9a96e;
  --c-gold-l: #e2c99a;
  --c-cream:  #f4ede0;
  --c-white:  #ffffff;
  --c-muted:  rgba(255,255,255,0.55);

  --nav-h: 68px;
  --radius: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-white);
  background: var(--c-dark);
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════
   FIXED BACKGROUND
═══════════════════════════════════════════ */
#bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('images/fond.webp?auto=compress&cs=tinysrgb&w=1920');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(18, 32, 47, 0.35);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--c-white);
  transition: color 0.4s var(--ease);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-white);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
  opacity: 0.75;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--c-gold);
  transition: width 0.35s var(--ease);
}

.nav-link:hover { opacity: 1; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { opacity: 1; color: var(--c-gold-l); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: background 0.3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: rgba(18, 32, 47, 0.97);
  border-top: 1px solid rgba(201,169,110,0.2);
}
.nav-mobile.open { display: flex; }

.nav-mobile-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-cream);
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s, background 0.2s;
}
.nav-mobile-link:hover { color: var(--c-gold); background: rgba(255,255,255,0.04); }

.nav-progress {
  height: 2px;
  background: rgba(255,255,255,0.1);
}
.nav-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--c-gold);
  transition: width 0.1s linear;
}

/* Navbar dark state (sections 2, 4) */
#navbar.is-dark {
  background: rgba(18, 32, 47, 0.96);
  border-bottom-color: rgba(201,169,110,0.25);
}
#navbar.is-dark .nav-brand,
#navbar.is-dark .nav-link { color: var(--c-cream); }
#navbar.is-dark .nav-link.active { color: var(--c-gold); }
#navbar.is-dark .nav-burger span { background: var(--c-cream); }

/* ═══════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════ */
main { position: relative; z-index: 2; }

.section {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.section-inner {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) 2rem 4rem;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-white);
}
.section-header h2 em {
  font-style: italic;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--c-gold-l);
}

/* ─── ACCUEIL ─── */
.accueil-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding-top: var(--nav-h);
  gap: 4rem;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeUp 1s var(--ease) both;
}

.site-logo {
  width: clamp(240px, 20vw, 400px);
  height: auto;
  filter: drop-shadow(0 4px 24px rgba(201,169,110,0.35));
}

.baseline {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: var(--c-white);
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.scroll-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--c-gold-l);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: fadeUp 1s 0.4s var(--ease) both;
}
.scroll-cta svg {
  width: 20px;
  height: 20px;
  animation: bounce 2s infinite;
}

/* ─── HISTOIRE ─── */
.histoire-inner {
  display: flex;
  flex-direction: column;
}

.histoire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.histoire-text p {
  color: rgba(255,255,255,0.82);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}
.histoire-text strong { color: var(--c-gold-l); }

.histoire-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}
.histoire-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(201,169,110,0.3);
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
  padding-bottom: 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-gold);
  border: 2px solid rgba(18,32,47,0.6);
  flex-shrink: 0;
}

.timeline-content { flex: 1; }

.timeline-year {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--c-gold);
  display: block;
  margin-bottom: 0.35rem;
}
.timeline-content p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}

/* ─── PROJET ─── */
.projet-inner {
  display: flex;
  flex-direction: column;
}

.projet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.projet-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.projet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.projet-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.projet-card-body {
  padding: 1.5rem;
}

.projet-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-gold);
  border: 1px solid rgba(201,169,110,0.4);
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 0.75rem;
}

.projet-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.projet-card-body p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.6;
}

/* ─── CONTACT ─── */
.contact-inner {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

#contact-form {
  max-width: 700px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s, background 0.25s;
  outline: none;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--c-gold);
  background: rgba(255,255,255,0.1);
}

.form-feedback {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  padding: 0.6rem 0;
  min-height: 1.4rem;
  transition: color 0.3s;
}
.form-feedback.success { color: #6fcf97; }
.form-feedback.error   { color: #eb5757; }

.btn-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--c-gold);
  color: var(--c-dark);
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
  overflow: hidden;
}
.btn-submit:hover { background: var(--c-gold-l); transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-arrow { width: 16px; height: 16px; }

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(18,32,47,0.3);
  border-top-color: var(--c-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-submit.loading .btn-text,
.btn-submit.loading .btn-arrow { display: none; }
.btn-submit.loading .btn-loader { display: block; }

/* ─── FOOTER ─── */
#footer {
  margin-top: 6rem;
  background: rgba(12, 20, 30, 0.92);
  border-top: 1px solid rgba(201,169,110,0.2);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1rem;
}

.footer-col address,
.footer-col p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  font-style: normal;
  line-height: 1.75;
}

.footer-col a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--c-gold-l); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}
.footer-bottom a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--c-gold); }

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .histoire-grid { grid-template-columns: 1fr; gap: 3rem; }
  .projet-grid   { grid-template-columns: 1fr; max-width: 480px; }
  .footer-inner  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
}
