/* ======================================================
   RÉA-CTIVE — STYLE GLOBAL
   Version corrigée avec menu centralisé
====================================================== */

/* ======================================================
   RESET / BASE
====================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #101820;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ======================================================
   HEADER / LOGO / NAVIGATION
====================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid rgba(16, 24, 32, 0.08);
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.04);
}

.header-content {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo img {
  width: 72px;
  max-width: 72px;
  height: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.nav-link-simple,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #101820;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link-simple:hover,
.nav-dropdown-toggle:hover {
  background: rgba(56, 182, 214, 0.10);
  color: #0f8fa8;
}

.nav-dropdown {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.nav-dropdown-toggle::after {
  content: "▾";
  margin-left: 7px;
  font-size: 0.7rem;
  color: #38b6d6;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 245px;
  padding: 10px;
  margin-top: 0;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(56, 182, 214, 0.16);
  box-shadow: 0 20px 45px rgba(16, 24, 32, 0.16);
  display: grid;
  gap: 4px;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s linear 0.22s;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s linear 0s;
}

.nav-dropdown-menu a {
  display: block;
  padding: 11px 13px;
  border-radius: 14px;
  color: #101820;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-menu a:hover {
  background: rgba(56, 182, 214, 0.10);
  color: #0f8fa8;
  transform: translateX(2px);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: #38b6d6;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(56, 182, 214, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-button:hover {
  transform: translateY(-1px);
  background: #0f8fa8;
  box-shadow: 0 16px 34px rgba(56, 182, 214, 0.34);
}

.theme-toggle {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.04);
  color: #101820;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(56, 182, 214, 0.12);
  color: #0f8fa8;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: none;
  background: #38b6d6;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

/* ======================================================
   HERO / SECTIONS
====================================================== */

main {
  overflow: hidden;
}

.page-hero {
  padding: 86px 0 72px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 182, 214, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(56, 182, 214, 0.08), rgba(255, 255, 255, 1) 42%);
}

.page-hero-content {
  max-width: 900px;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.9rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
  color: #101820;
  margin-bottom: 24px;
}

.page-hero p {
  font-size: 1.15rem;
  color: #24323c;
  max-width: 840px;
  margin-bottom: 22px;
}

.section {
  padding: 74px 0;
  background: #ffffff;
}

.section-light {
  background: #f7fbfd;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 34px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #101820;
  margin-bottom: 16px;
}

.section-heading p {
  color: #34434d;
  font-size: 1.05rem;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: #243c52;
  font-size: 0.95rem !important;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ======================================================
   BOUTONS
====================================================== */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  border: 2px solid #38b6d6;
  background: #38b6d6;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(56, 182, 214, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #0f8fa8;
  border-color: #0f8fa8;
  box-shadow: 0 18px 38px rgba(56, 182, 214, 0.34);
}

.btn-outline {
  border: 2px solid #38b6d6;
  background: transparent;
  color: #0f8fa8;
}

.btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(56, 182, 214, 0.10);
  box-shadow: 0 12px 28px rgba(56, 182, 214, 0.14);
}

/* ======================================================
   DASHBOARD ESPACE MEMBRE
====================================================== */

.dashboard-user-box {
  margin-top: 24px;
  padding: 18px 22px;
  border-radius: 22px;
  background: rgba(56, 182, 214, 0.08);
  border: 1px solid rgba(56, 182, 214, 0.14);
  color: #34434d;
  max-width: 760px;
}

.dashboard-user-box strong {
  color: #101820;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.dashboard-card {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(56, 182, 214, 0.14);
  box-shadow: 0 16px 40px rgba(16, 24, 32, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(16, 24, 32, 0.12);
}

.dashboard-card h2 {
  margin-bottom: 10px;
  color: #101820;
  font-size: 1.35rem;
}

.dashboard-card p {
  color: #34434d;
  margin-bottom: 18px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-actions a {
  text-decoration: none;
}

.dashboard-icon {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: rgba(56, 182, 214, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

/* ======================================================
   FORMULAIRES / CARTES
====================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.contact-form-box,
.contact-info-box,
.text-block {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(56, 182, 214, 0.14);
  box-shadow: 0 16px 40px rgba(16, 24, 32, 0.08);
}

.contact-form-box h2,
.contact-info-box h2,
.text-block h2 {
  color: #101820;
  margin-bottom: 16px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-group label {
  color: #101820;
  font-weight: 900;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid rgba(16, 24, 32, 0.16);
  background: #ffffff;
  color: #101820;
  font-size: 0.96rem;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #38b6d6;
  box-shadow: 0 0 0 4px rgba(56, 182, 214, 0.14);
}

.form-help {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-top: 6px;
}

.form-section-separator {
  border: none;
  border-top: 1px solid rgba(16, 24, 32, 0.12);
  margin: 22px 0;
}

.list-box {
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(56, 182, 214, 0.08);
  border: 1px solid rgba(56, 182, 214, 0.14);
}

.list-box ul {
  padding-left: 20px;
}

.list-box li {
  margin-bottom: 8px;
}

/* ======================================================
   MESSAGES
====================================================== */

.message-success,
.message-error {
  margin-bottom: 28px;
  padding: 24px 30px;
  border-radius: 24px;
  font-weight: 800;
  box-shadow: 0 14px 38px rgba(16, 24, 32, 0.08);
}

.message-success {
  border-left: 6px solid #1e8449;
  background: #eafaf1;
  color: #145a32;
}

.message-error {
  border-left: 6px solid #922b21;
  background: #fdecea;
  color: #922b21;
}

.message-success p,
.message-error p {
  margin: 0;
}

.message-error ul {
  margin: 10px 0 0 20px;
}

/* ======================================================
   LISTES ADMIN / CARTES
====================================================== */

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-list-item {
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.08);
  border: 1px solid rgba(56, 182, 214, 0.14);
}

.admin-list-item h3 {
  color: #101820;
  margin-bottom: 8px;
}

.small-muted {
  color: #667782;
  font-size: 0.9rem;
}

.mini-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.mini-actions .btn-outline,
.mini-actions .btn-primary {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.84rem;
}

/* ======================================================
   BADGES / STATUTS
====================================================== */

.status-pill,
.member-badge,
.formation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(56, 182, 214, 0.18);
  color: #0f8fa8;
}

.badge-success,
.status-done,
.status-pill.accepte {
  background: rgba(30, 132, 73, 0.14);
  color: #1e8449;
}

.badge-danger,
.status-cancelled,
.status-pill.refuse,
.status-pill.annule {
  background: rgba(146, 43, 33, 0.12);
  color: #922b21;
}

.badge-warning {
  background: rgba(243, 156, 18, 0.16);
  color: #b9770e;
}

.badge-info,
.status-planned {
  background: rgba(56, 182, 214, 0.18);
  color: #0f8fa8;
}

.badge-neutral,
.status-neutral,
.status-pill.transforme_facture {
  background: rgba(52, 73, 94, 0.14);
  color: #34495e;
}

/* ======================================================
   FOOTER
====================================================== */

.site-footer {
  background: #101820;
  color: #ffffff;
  padding: 56px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-logo {
  width: 72px;
  max-width: 72px;
  height: auto;
  flex-shrink: 0;
}

.footer-brand h2,
.footer-block h3 {
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-brand p,
.footer-block p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 5px;
}

.footer-bottom {
  margin-top: 42px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

/* ======================================================
   ANIMATIONS
====================================================== */

.fade-in {
  animation: fadeInUp 0.55s ease both;
}

.fade-in-delay-1 {
  animation-delay: 0.08s;
}

.fade-in-delay-2 {
  animation-delay: 0.16s;
}

.fade-in-delay-3 {
  animation-delay: 0.24s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================================================
   MODE NUIT
====================================================== */

body.dark-mode {
  background: #101820;
  color: #ffffff;
}

body.dark-mode .site-header {
  background: #101820;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

body.dark-mode .page-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 182, 214, 0.16), transparent 36%),
    linear-gradient(135deg, #101820, #17242d 70%);
}

body.dark-mode .page-hero h1,
body.dark-mode .section-heading h2,
body.dark-mode .contact-form-box h2,
body.dark-mode .contact-info-box h2,
body.dark-mode .text-block h2,
body.dark-mode .admin-list-item h3,
body.dark-mode .dashboard-card h2,
body.dark-mode .form-group label {
  color: #ffffff;
}

body.dark-mode .page-hero p,
body.dark-mode .section-heading p,
body.dark-mode .contact-form-box,
body.dark-mode .contact-info-box,
body.dark-mode .text-block,
body.dark-mode .admin-list-item,
body.dark-mode .dashboard-card p,
body.dark-mode .dashboard-user-box {
  color: rgba(255, 255, 255, 0.75);
}

body.dark-mode .section,
body.dark-mode .section-light {
  background: #101820;
}

body.dark-mode .contact-form-box,
body.dark-mode .contact-info-box,
body.dark-mode .text-block,
body.dark-mode .admin-list-item,
body.dark-mode .dashboard-card {
  background: #17242d;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

body.dark-mode .dashboard-user-box,
body.dark-mode .list-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .dashboard-user-box strong {
  color: #ffffff;
}

body.dark-mode .dashboard-icon {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .nav-link-simple,
body.dark-mode .nav-dropdown-toggle {
  color: #ffffff;
}

body.dark-mode .nav-link-simple:hover,
body.dark-mode .nav-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #38b6d6;
}

body.dark-mode .nav-dropdown-menu {
  background: #17242d;
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

body.dark-mode .nav-dropdown-menu a {
  color: rgba(255, 255, 255, 0.88);
}

body.dark-mode .nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #38b6d6;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  background: #101820;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.dark-mode .theme-toggle:hover {
  background: rgba(56, 182, 214, 0.18);
  color: #38b6d6;
}

body.dark-mode .small-muted {
  color: rgba(255, 255, 255, 0.55);
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 1180px) {
  .header-content {
    gap: 14px;
  }

  .nav-link-simple,
  .nav-dropdown-toggle {
    font-size: 0.84rem;
    padding: 0 8px;
  }

  .nav-button,
  .theme-toggle {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 0.84rem;
  }
}

@media (max-width: 980px) {
  .header-content {
    min-height: 76px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .logo img {
    width: 62px;
    max-width: 62px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 0;
  }

  .main-nav.is-open,
  .main-nav.open,
  .main-nav.active {
    display: flex;
  }

  .nav-link-simple,
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
    padding: 12px 14px;
  }

  .nav-dropdown {
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-dropdown-menu {
    position: static;
    display: grid;
    gap: 4px;
    min-width: 0;
    width: 100%;
    margin: 4px 0 10px 0;
    box-shadow: none;
    border-radius: 16px;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .page-hero {
    padding: 64px 0 56px;
  }

  .dashboard-grid,
  .contact-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .page-hero h1 {
    font-size: 2.45rem;
  }

  .section {
    padding: 56px 0;
  }

  .hero-actions,
  .dashboard-actions,
  .mini-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-outline,
  .nav-button,
  .theme-toggle {
    width: 100%;
  }
}
