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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 95px;
}

/* =====================================================
   PALETTE SANS TURQUOISE
   Bleu conservé seulement pour Facebook
===================================================== */

:root {
  --gris-tres-clair: #eeeeee;
  --gris-fonce: #333333;
  --gris-anthracite: #303030;
  --blanc: #ffffff;
  --noir-grisatre: #1f1f1f;
  --gris-clair: #cccccc;
  --gris-moyen: #444444;
  --fond-sombre: #181818;
  --carte-sombre: #242424;
  --noir: #000000;

  --ombre: 0 2px 10px rgba(0, 0, 0, 0.13);
  --ombre-hover-sombre: 0 0 18px rgba(255, 255, 255, 0.42);
  --ombre-hover-clair: 0 0 18px rgba(48, 48, 48, 0.30);
}

/* =====================================================
   BODY ET MODES
===================================================== */

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  background: var(--fond-sombre);
  color: var(--gris-tres-clair);
  transition: background 0.35s ease, color 0.35s ease;
}

body.light-mode {
  background: var(--gris-tres-clair);
  color: var(--gris-fonce);
}

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

.fade-magic {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.fade-magic.show-magic {
  opacity: 1;
  transform: translateY(0);
}

header,
.hero,
.card,
footer {
  animation: apparition 0.8s ease both;
}

@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--gris-anthracite);
  color: var(--blanc);
  border-bottom: 1px solid var(--gris-moyen);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.logo {
  width: 86px;
  height: auto;
  flex-shrink: 0;
}

header h1 {
  flex: 1;
  margin: 0;
  color: var(--blanc);
  font-size: 24px;
  text-align: center;
}

/* =====================================================
   MENU
===================================================== */

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

nav a {
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--blanc);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

nav a:hover,
nav a:focus-visible {
  background: transparent;
  color: var(--blanc);
  border-color: var(--blanc);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
  outline: none;
}

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

.theme-btn,
.menu-icon {
  cursor: pointer;
  transition: 0.3s ease;
}

/* Dark mode : bouton blanc avec icône noire */
.theme-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 2px solid var(--blanc);
  border-radius: 50%;
  background: var(--blanc);
  color: var(--noir);
  font-size: 18px;
}

/* Survol du bouton en dark mode */
.theme-btn:hover {
  background: transparent;
  color: var(--blanc);
  border-color: var(--blanc);
  box-shadow: 0 0 13px rgba(255, 255, 255, 0.65);
  transform: scale(1.06);
}

/* White mode : bouton noir avec icône blanche */
body.light-mode .theme-btn {
  background: var(--noir);
  color: var(--blanc);
  border-color: var(--noir);
}

/* Survol du bouton en white mode */
body.light-mode .theme-btn:hover {
  background: var(--blanc);
  color: var(--noir);
  border-color: var(--noir);
  box-shadow: 0 0 13px rgba(0, 0, 0, 0.38);
}

.menu-icon {
  display: none;
  padding: 8px 11px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--blanc);
  font-size: 29px;
}

.menu-icon:hover {
  background: transparent;
  border-color: var(--blanc);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

/* =====================================================
   ACCUEIL
===================================================== */

.hero {
  position: relative;
  min-height: 750px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  overflow: hidden;
  background-image: url("images/accueil1.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  text-align: center;
  transition: background-image 1s ease-in-out;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0, 0, 0, 0.40),
    rgba(0, 0, 0, 0.58)
  );
}

.hero h2 {
  position: relative;
  z-index: 1;
  color: var(--blanc);
  font-size: clamp(34px, 5vw, 54px);
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.9);
}

/* =====================================================
   SECTIONS GÉNÉRALES
===================================================== */

.card {
  width: min(1120px, calc(100% - 32px));
  margin: 42px auto;
  padding: 42px 28px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--carte-sombre);
  color: var(--gris-tres-clair);
  box-shadow: var(--ombre);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.35s ease;
}

.card:hover {
  border-color: var(--blanc);
  box-shadow: var(--ombre-hover-sombre);
  transform: translateY(-4px);
}

.card > h2 {
  margin-bottom: 30px;
  color: var(--blanc);
  font-size: 32px;
  font-weight: 800;
  text-align: center;
}

body.light-mode .card {
  background: var(--blanc);
  color: var(--gris-fonce);
  border-color: transparent;
}

body.light-mode .card:hover {
  border-color: var(--gris-anthracite);
  box-shadow: var(--ombre-hover-clair);
}

body.light-mode .card > h2 {
  color: var(--gris-anthracite);
}

/* =====================================================
   FLEX DES BLOCS
===================================================== */

.about-flex,
.services-flex,
.responsables-flex {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  flex-wrap: wrap;
}

/* =====================================================
   CARTES INTERNES
===================================================== */

.about-box,
.service-box,
.responsable-box,
.contact-box {
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--gris-anthracite);
  color: var(--gris-tres-clair);
  box-shadow: var(--ombre);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.about-box {
  width: calc(25% - 18px);
  min-width: 235px;
  padding: 30px 24px;
  text-align: center;
}

.service-box {
  width: calc(33.333% - 16px);
  min-width: 250px;
  padding: 32px 26px;
  text-align: center;
}

.responsable-box {
  width: calc(33.333% - 16px);
  min-width: 265px;
  padding: 30px 24px;
  text-align: center;
}

.about-box h3,
.service-box h3,
.responsable-box h3,
.contact-box h3 {
  margin-bottom: 16px;
  color: var(--blanc);
  font-size: 22px;
}

.about-box p,
.service-box p,
.responsable-box p,
.contact-box p {
  margin-bottom: 12px;
  color: var(--gris-tres-clair);
  line-height: 1.65;
}

.about-box:hover,
.service-box:hover,
.responsable-box:hover,
.contact-box:hover {
  border-color: var(--blanc);
  box-shadow: var(--ombre-hover-sombre);
  transform: translateY(-7px);
}

body.light-mode .about-box,
body.light-mode .service-box,
body.light-mode .responsable-box,
body.light-mode .contact-box {
  background: var(--blanc);
  color: var(--gris-fonce);
  border-color: transparent;
}

body.light-mode .about-box h3,
body.light-mode .service-box h3,
body.light-mode .responsable-box h3,
body.light-mode .contact-box h3 {
  color: var(--gris-anthracite);
}

body.light-mode .about-box p,
body.light-mode .service-box p,
body.light-mode .responsable-box p,
body.light-mode .contact-box p {
  color: var(--gris-moyen);
}

body.light-mode .about-box:hover,
body.light-mode .service-box:hover,
body.light-mode .responsable-box:hover,
body.light-mode .contact-box:hover {
  border-color: var(--gris-anthracite);
  box-shadow: var(--ombre-hover-clair);
}

/* =====================================================
   SERVICES
===================================================== */

.service-icon {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 2px solid var(--blanc);
  border-radius: 50%;
  background: var(--noir-grisatre);
  color: var(--blanc);
  font-size: 31px;
  transition: 0.3s ease;
}

.service-box:hover .service-icon {
  border-color: var(--blanc);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
  transform: scale(1.08);
}

body.light-mode .service-icon {
  background: var(--blanc);
  color: var(--gris-anthracite);
  border-color: var(--gris-anthracite);
}

body.light-mode .service-box:hover .service-icon {
  box-shadow: 0 0 14px rgba(48, 48, 48, 0.35);
}

/* =====================================================
   RESPONSABLES
===================================================== */

.responsable-box img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 17px;
  border: 4px solid var(--blanc);
  border-radius: 50%;
  box-shadow: var(--ombre);
}

body.light-mode .responsable-box img {
  border-color: var(--gris-anthracite);
}

.responsable-box h4 {
  margin: 7px 0 14px;
  color: var(--gris-clair);
  font-size: 17px;
}

body.light-mode .responsable-box h4 {
  color: var(--gris-moyen);
}

/* =====================================================
   GALERIE
===================================================== */

.slider {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#slide {
  width: 100%;
  min-width: 0;
  max-height: 500px;
  object-fit: cover;
  border: 3px solid var(--blanc);
  border-radius: 10px;
  box-shadow: var(--ombre);
}

body.light-mode #slide {
  border-color: var(--gris-anthracite);
}

/* =====================================================
   VIDÉO
===================================================== */

video {
  display: block;
  width: min(760px, 100%);
  margin: auto;
  border: 3px solid var(--blanc);
  border-radius: 10px;
  background: var(--noir);
  box-shadow: var(--ombre);
}

body.light-mode video {
  border-color: var(--gris-anthracite);
}

/* =====================================================
   BOUTONS GALERIE ET FORMULAIRE
===================================================== */

.slider button,
form button {
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--gris-anthracite);
  color: var(--blanc);
  cursor: pointer;
  font-weight: 800;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.slider button {
  width: 48px;
  min-width: 48px;
  padding: 13px 6px;
  font-size: 22px;
}

form button {
  width: 100%;
  margin-top: 18px;
  padding: 13px 24px;
  font-size: 17px;
}

.slider button:hover,
form button:hover {
  background: var(--gris-anthracite);
  color: var(--blanc);
  border-color: var(--blanc);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

body.light-mode .slider button:hover,
body.light-mode form button:hover {
  border-color: var(--noir);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
}

form button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

/* =====================================================
   CONTACT : DISPOSITION CORRIGÉE
===================================================== */

.contact-section {
  padding-bottom: 48px;
}

.contact-flex {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 28px;
  align-items: stretch;
}

.contact-box {
  width: 100%;
  min-width: 0;
  padding: 32px 28px;
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-person {
  padding: 16px 0;
  border-bottom: 1px solid var(--gris-moyen);
}

.contact-person:last-child {
  border-bottom: none;
}

.contact-person h4,
.contact-box h4 {
  margin-bottom: 6px;
  color: var(--gris-clair);
}

body.light-mode .contact-person h4,
body.light-mode .contact-box h4 {
  color: var(--gris-moyen);
}

.contact-person a,
.contact-box a {
  display: inline-block;
  color: var(--blanc);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}

.contact-person a:hover,
.contact-box a:hover {
  color: var(--blanc);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.65);
}

body.light-mode .contact-person a,
body.light-mode .contact-box a {
  color: var(--gris-anthracite);
}

body.light-mode .contact-person a:hover,
body.light-mode .contact-box a:hover {
  color: var(--noir);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}

.contact-form-box form {
  width: 100%;
  text-align: left;
}

.contact-form-box label {
  display: block;
  margin: 14px 0 6px;
  color: var(--gris-tres-clair);
  font-weight: 700;
}

body.light-mode .contact-form-box label {
  color: var(--gris-fonce);
}

.contact-form-box input,
.contact-form-box textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--gris-clair);
  border-radius: 6px;
  background: var(--blanc);
  color: var(--gris-fonce);
  font: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-form-box input:focus,
.contact-form-box textarea:focus {
  border-color: var(--gris-anthracite);
  box-shadow: 0 0 0 3px rgba(48, 48, 48, 0.18);
}

.contact-form-box textarea {
  min-height: 145px;
  resize: vertical;
}

/* =====================================================
   MESSAGES DU FORMULAIRE
===================================================== */

.form-status {
  min-height: 24px;
  margin-top: 14px;
  font-weight: 700;
  text-align: center;
}

.form-status.loading {
  color: var(--gris-clair);
}

.form-status.success {
  color: var(--blanc);
}

.form-status.error {
  color: var(--gris-clair);
}

body.light-mode .form-status.loading,
body.light-mode .form-status.error {
  color: var(--gris-moyen);
}

body.light-mode .form-status.success {
  color: var(--gris-anthracite);
}

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

footer {
  margin-top: 50px;
  padding: 42px 20px 18px;
  background: var(--gris-anthracite);
  color: var(--blanc);
}

.footer-flex {
  max-width: 1120px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  margin: auto;
  flex-wrap: wrap;
}

.footer-box {
  width: 245px;
  text-align: center;
}

.footer-box h3 {
  margin-bottom: 15px;
  color: var(--blanc);
}

.footer-box p {
  color: var(--gris-tres-clair);
  line-height: 1.65;
}

.footer-box a {
  display: block;
  margin: 8px 0;
  color: var(--blanc);
  text-decoration: none;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}

.footer-box a:hover {
  color: var(--blanc);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.65);
}

.footer-bottom {
  max-width: 1120px;
  margin: 28px auto 0;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.20);
  text-align: center;
  font-size: 14px;
}

/* =====================================================
   RÉSEAUX SOCIAUX
===================================================== */

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.social-links a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  color: var(--blanc);
  font-size: 23px;
  text-decoration: none;
  transition: 0.3s ease;
}

/* Facebook garde son bleu officiel */
.social-links a[aria-label="Facebook"] {
  background: #1877f2;
}

/* TikTok sans turquoise/cyan */
.social-links a[aria-label="TikTok"] {
  background: var(--noir);
  color: var(--blanc);
  border-color: var(--blanc);
  text-shadow: none;
}

/* WhatsApp garde son vert officiel */
.social-links a[aria-label="WhatsApp"] {
  background: #25d366;
}

.social-links a:hover {
  color: var(--blanc);
  border-color: var(--blanc);
  transform: scale(1.10);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.60);
}

/* =====================================================
   TABLETTE ET MENU RESPONSIVE
===================================================== */

@media (max-width: 1100px) {
  header h1 {
    font-size: 20px;
  }

  .menu-icon {
    display: block;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--gris-anthracite);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.25);
  }

  nav.show {
    display: flex;
  }

  nav a {
    width: 100%;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0;
    text-align: center;
  }

  nav a:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 620px;
  }

  .about-box {
    width: calc(50% - 12px);
  }

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

  .contact-info {
    justify-content: flex-start;
  }
}

/* =====================================================
   IPHONE ET ANDROID
===================================================== */

@media (max-width: 767px) {
  html {
    scroll-padding-top: 78px;
  }

  header {
    gap: 8px;
    padding: 8px 10px;
  }

  .logo {
    width: 62px;
  }

  header h1 {
    font-size: 15px;
  }

  .theme-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .menu-icon {
    font-size: 25px;
  }

  .hero {
    min-height: 470px;
    padding: 20px;
  }

  .card {
    width: calc(100% - 20px);
    margin: 20px auto;
    padding: 30px 18px;
  }

  .card > h2 {
    font-size: 27px;
  }

  .about-box,
  .service-box,
  .responsable-box,
  .footer-box {
    width: 100%;
    min-width: 0;
  }

  .contact-flex {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-box {
    width: 100%;
    min-width: 0;
    padding: 25px 18px;
  }

  .contact-person a,
  .contact-box a {
    font-size: 17px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .slider {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 6px;
  }

  .slider button {
    width: 42px;
    min-width: 42px;
    padding: 10px 5px;
  }

  #slide {
    width: 100%;
    max-height: 350px;
  }
}

/* =====================================================
   PETITS IPHONE ET PETITS ANDROID
===================================================== */

@media (max-width: 380px) {
  header {
    gap: 5px;
    padding: 7px 6px;
  }

  .logo {
    width: 48px;
  }

  header h1 {
    font-size: 12px;
    line-height: 1.15;
  }

  .theme-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .menu-icon {
    padding: 5px;
    font-size: 22px;
  }

  .hero h2 {
    font-size: 27px;
  }

  .card > h2 {
    font-size: 23px;
  }

  .slider {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 4px;
  }

  .slider button {
    width: 36px;
    min-width: 36px;
    padding: 8px 3px;
    font-size: 16px;
  }

  .contact-box {
    padding: 22px 14px;
  }

  .contact-form-box input,
  .contact-form-box textarea {
    font-size: 16px;
  }
}

/* =====================================================
   ORDINATEUR
===================================================== */

@media (min-width: 1101px) {
  nav {
    position: static;
    width: auto;
    display: flex;
    flex-direction: row;
    background: transparent;
  }

  .menu-icon {
    display: none;
  }
}

/* =====================================================
   ACCESSIBILITÉ
===================================================== */

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