/* ═══════════════════════════════════════════
   BDE Polytech Clermont — Feuille de styles
   ═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --green:       #2E7D32;
  --green-light: #4CAF50;
  --green-dark:  #1B5E20;
  --green-pale:  #E8F5E9;
  --green-mid:   #A5D6A7;
  --white:       #FFFFFF;
  --off-white:   #F7F9F7;
  --gray-100:    #F0F4F0;
  --gray-300:    #C8D8C8;
  --gray-500:    #6B8A6B;
  --gray-700:    #2D3D2D;
  --black:       #111811;
  --radius:      12px;
  --radius-lg:   20px;
  --max-width:   1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Instrument Sans', sans-serif;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-300);
  transition: box-shadow 0.3s;
}

#navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 17px;
  color: var(--green-dark);
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo-dot {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}

.nav-links {
  display: flex; gap: 2rem; list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  color: var(--gray-700);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--green);
  transition: width 0.25s;
}

.nav-links a:hover { color: var(--green); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--green); color: white;
  padding: 8px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--green-dark); transform: translateY(-1px); }

/* Burger mobile */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 6px;
}

.nav-burger span {
  display: block; width: 100%; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 5% 60px;
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-bg-shape.s1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: rgba(76, 175, 80, 0.15);
}

.hero-bg-shape.s2 {
  width: 300px; height: 300px;
  bottom: 50px; left: -80px;
  background: rgba(165, 214, 167, 0.10);
}

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

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(165, 214, 167, 0.2);
  border: 1px solid rgba(165, 214, 167, 0.4);
  color: var(--green-mid);
  padding: 6px 14px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-light);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-title span { color: var(--green-light); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

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

.btn-primary {
  background: var(--green-light); color: white;
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}

.btn-primary:hover {
  background: white; color: var(--green-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent; color: white;
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex; gap: 3rem; flex-wrap: wrap;
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 2.5rem;
}

.hero-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem; font-weight: 800; color: white;
  line-height: 1;
}

.hero-stat-label {
  font-size: 13px; color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   SECTIONS — UTILITAIRES COMMUNS
══════════════════════════════════════════ */
section {
  padding: 100px 5%;
}

.section-label {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 6px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--gray-500);
  line-height: 1.8;
  max-width: 560px;
}

/* ══════════════════════════════════════════
   À PROPOS
══════════════════════════════════════════ */
#apropos {
  background: var(--off-white);
}

.apropos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.apropos-visual {
  position: relative;
  height: 420px;
}

.apropos-card-main {
  position: absolute;
  top: 0; left: 0; right: 60px; bottom: 60px;
  background: var(--green-dark);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem;
  overflow: hidden;
}

.apropos-card-main::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.2);
  pointer-events: none;
}

.apropos-card-main-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 700; color: white;
  position: relative; z-index: 1;
  line-height: 1.3;
}

.apropos-card-main-sub {
  font-size: 13px; color: rgba(255, 255, 255, 0.6);
  margin-top: 6px; position: relative; z-index: 1;
}

.apropos-card-float {
  position: absolute;
  bottom: 0; right: 0; left: 80px; top: 280px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-300);
  display: flex; align-items: center; gap: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.apropos-icon-circle {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.apropos-icon-circle svg {
  width: 22px; height: 22px;
  stroke: var(--green-dark);
}

.apropos-card-float-title { font-weight: 600; font-size: 14px; color: var(--black); }
.apropos-card-float-sub   { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.apropos-features {
  margin-top: 2.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.apropos-feature {
  display: flex; align-items: flex-start; gap: 12px;
}

.feature-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--green-pale); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.feature-icon svg {
  width: 18px; height: 18px;
  stroke: var(--green-dark);
}

.feature-text {
  font-size: 14px; color: var(--gray-700); line-height: 1.7;
  padding-top: 8px;
}

.feature-text strong { color: var(--black); font-weight: 600; }

/* ══════════════════════════════════════════
   BUREAU
══════════════════════════════════════════ */
#bureau {
  background: white;
}

#bureau .container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.bureau-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 3.5rem;
}

.bureau-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* ── Flip card wrapper ── */
.bureau-card {
  perspective: 900px;
  height: 270px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  position: relative;
}



/* ── À modifier sur le conteneur ── */
.bureau-card-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d; /* Ajout recommandé pour Safari */
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-lg);
}

/* ── Faces communes corrigées ── */
.bureau-card-front,
.bureau-card-back {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  
  /* LIGNES SUPPRIMÉES POUR RÉPARER LA 3D : */
  /* transform-style: preserve-3d; */
  /* overflow: hidden; */

  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.bureau-card-front {
  background: var(--off-white);
  border: 1px solid var(--gray-300);
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: box-shadow 0.25s;
}

.bureau-card:hover .bureau-card-front {
  box-shadow: 0 16px 40px rgba(46, 125, 50, 0.13);
}

/* ── Face arrière ── */
.bureau-card-back {
  background: var(--green-dark);
  transform: rotateY(180deg);
  padding: 1.5rem;
  text-align: center;
  gap: 0.75rem;
}

.bureau-card-back .bureau-avatar {
  width: 130px; height: 130px;
  border: 3px solid rgba(165,214,167,0.5);
  margin-bottom: 0.5rem;
}

.bureau-card-back .bureau-name {
  color: white;
  font-size: 16px;
}

.bureau-card-back .bureau-role {
  background: rgba(165,214,167,0.2);
  color: var(--green-mid);
  border: 1px solid rgba(165,214,167,0.3);
}

.bureau-card-back .bureau-promo {
  color: rgba(255,255,255,0.5);
}

/* ── Avatar (face avant) ── */
.bureau-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 800; color: white;
  margin: 0 auto 1rem;
  border: 3px solid var(--green-pale);
  object-fit: cover;
  background: white;
  flex-shrink: 0;
}

.bureau-name {
  font-weight: 700; font-size: 15px; color: var(--black);
  font-family: 'Syne', sans-serif;
}

.bureau-role {
  font-size: 12px; color: var(--green-dark); font-weight: 500;
  background: var(--green-pale);
  display: inline-block;
  padding: 3px 10px; border-radius: 100px;
  margin-top: 6px;
}

.bureau-promo {
  font-size: 12px; color: var(--gray-500); margin-top: 6px;
}

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
#contact {
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.12);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative; z-index: 1;
}

.contact-title { color: white; }
.contact-desc  { color: rgba(255, 255, 255, 0.65); }

.contact-items {
  margin-top: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}

.contact-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
}

.contact-item-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.contact-item-icon svg {
  width: 18px; height: 18px;
  stroke: var(--green-light);
}

.contact-item-label {
  font-size: 11px; color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase; letter-spacing: 0.06em;
}

.contact-item-value {
  font-size: 14px; color: white; font-weight: 500; margin-top: 2px;
}

/* Formulaire */
.contact-form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 1.25rem; color: var(--black);
  margin-bottom: 1.5rem;
}

.form-group { margin-bottom: 1rem; }

.form-label {
  font-size: 13px; font-weight: 500; color: var(--gray-700);
  display: block; margin-bottom: 6px;
}

.form-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px; color: var(--black);
  background: var(--off-white);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}

.form-input:focus {
  border-color: var(--green);
  background: white;
}

textarea.form-input {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-submit {
  width: 100%; padding: 13px;
  background: var(--green-dark); color: white;
  border: none; border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.form-submit:hover   { background: var(--green); transform: translateY(-1px); }
.form-submit:active  { transform: translateY(0); }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.form-feedback {
  margin-top: 0.75rem;
  font-size: 13px; font-weight: 500;
  min-height: 18px; text-align: center;
}

.form-feedback.success { color: var(--green); }
.form-feedback.error   { color: #C62828; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.5);
  padding: 1.75rem 5%;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap; gap: 1rem;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 16px;
  color: white; text-decoration: none;
  transition: color 0.2s;
}

.footer-logo:hover { color: var(--green-light); }

.footer-socials { display: flex; gap: 10px; }

.footer-social {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.footer-social:hover {
  background: var(--green);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 16px; height: 16px;
  stroke: rgba(255, 255, 255, 0.7);
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLETTE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .apropos-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .apropos-visual {
    height: 320px;
  }

  .apropos-card-main  { right: 40px; bottom: 40px; }
  .apropos-card-float { left: 60px; top: 220px; }

  .bureau-header {
    flex-direction: column; align-items: flex-start;
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════ */
@media (max-width: 640px) {
  section { padding: 70px 5%; }

  /* Nav mobile */
  #navbar { flex-wrap: wrap; height: auto; padding: 12px 5%; gap: 0; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%; gap: 0;
    padding: 0.5rem 0 1rem;
  }

  .nav-links.open { display: flex; }
  .nav-links li a  { display: block; padding: 10px 0; border-bottom: 1px solid var(--gray-300); }

  .nav-cta  { display: none; }
  .nav-burger { display: flex; }

  /* Hero */
  #hero { padding-top: 120px; }
  .hero-stats { gap: 1.75rem; }

  /* Bureau */
  .bureau-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
}