/* ========== Reset léger ========== */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;

  /* Footer plus bas (en bas de page même si peu de contenu) */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== Accessibilité ========== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: #ffffff;
  color: #111827;
  padding: 8px 10px;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus { left: 8px; }

/* ========== Thèmes ========== */
html[data-theme="light"] {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;

  --royal: #002b66;
  --nav-bg: var(--royal);
  --nav-border: rgba(255, 255, 255, 0.18);
  --nav-text: #ffffff;
  --nav-link: #ffffff;

  --yellow: #f5c400;
  --yellow-text: #111827;

  --footer-overlay: rgba(0, 43, 102, 0.58);

  --field-bg: #ffffff;
  --field-border: #d1d5db;
  --focus: #f5c400; /* focus jaune */
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #22304a;

  --royal: #001a3d;
  --nav-bg: var(--royal);
  --nav-border: rgba(255, 255, 255, 0.14);
  --nav-text: #ffffff;
  --nav-link: #ffffff;

  --yellow: #f5c400;
  --yellow-text: #111827;

  --footer-overlay: rgba(0, 26, 61, 0.62);

  --field-bg: #0f172a;
  --field-border: #334155;
  --focus: #f5c400;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ========== Header / Navbar ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 12px 16px;
  border-bottom: 1px solid var(--nav-border);
  background: var(--nav-bg);
}

.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Logo cartouche blanc */
.logo-area {
  display: inline-flex;
  align-items: center;
  text-decoration: none;

  background: #ffffff;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.logo-nav {
  display: block;
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* Boutons header */
.btn-connect,
.btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;

  padding: 8px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--nav-text);
  background: rgba(255, 255, 255, 0.10);
}

.btn-connect:hover { background: rgba(255, 255, 255, 0.18); }

.btn-signup {
  background: var(--yellow);
  color: var(--yellow-text);
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.btn-signup:hover { filter: brightness(0.95); }

/* Menu desktop */
.navbar-menu {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.navbar-menu a {
  color: var(--nav-link);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
}
.navbar-menu a:hover { background: rgba(255, 255, 255, 0.14); }
.navbar-menu a[aria-current="page"] { background: rgba(255, 255, 255, 0.20); }

/* Burger */
.menu-toggle {
  display: none; /* visible en mobile */
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.18); }

/* Items mobile uniquement */
.mobile-only { display: none; }
.desktop-only { display: inline-flex; }

/* Boutons dans le menu mobile */
.menu-btn {
  width: 100%;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.10);
  font-weight: 800;
}
.menu-btn--yellow {
  background: var(--yellow);
  color: var(--yellow-text);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ========== Toggle Jour / Nuit ========== */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nav-text);
  font-weight: 800;
  user-select: none;
}
.theme-switch__label { font-size: 0.95rem; }

.theme-switch__btn {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  padding: 0;
  cursor: pointer;
  position: relative;
}

.theme-switch__thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  transition: left 180ms ease;
}
.theme-switch__btn[aria-checked="true"] .theme-switch__thumb { left: 23px; }

/* ========== Contenu ========== */
main {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
  text-align: center;

  /* pousse le footer en bas */
  flex: 1;
}

.home-logo {
  height: 180px;
  width: auto;
  display: block;
  margin: 22px auto 12px;
  object-fit: contain;
}

.logo-central {
  height: 150px;
  width: auto;
  display: block;
  margin: 18px auto 14px;
  object-fit: contain;
}

.hero-title {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.25;
  margin: 12px auto 10px;
  max-width: 900px;
  font-weight: 800;
}

.hero-sub {
  margin: 6px auto;
  max-width: 900px;
  color: var(--muted);
  font-weight: 600;
}
.hero-sub--last { margin-top: 10px; }

.accroche {
  max-width: 900px;
  margin: 14px auto 0;
}

.highlight { font-weight: 800; }

.content {
  text-align: left;
}
.content h1,
.content .logo-central,
.content .accroche {
  text-align: center;
}

.content-section {
  margin-top: 16px;
}

.content-section h2 {
  margin: 16px 0 8px;
  font-size: 1.15rem;
}

.subheading {
  margin: 14px 0 8px;
  font-size: 1.05rem;
}

.instruction-text {
  margin: 8px 0 10px;
}

.note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Listes plus denses */
.bullets {
  margin: 8px 0 10px 0;
  padding-left: 18px;
}
.bullets li {
  margin: 6px 0;
}

/* ========== Formulaires (contact + suggestion) ========== */
form {
  max-width: 780px;
  margin: 10px auto 0;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

label {
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* Focus jaune (demandé) */
input:focus, select:focus, textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
}

button[type="submit"] {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 900;
  background: var(--yellow);
  color: var(--yellow-text);
}

.form-note {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
}

/* Honeypot anti-spam */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Alert */
.alert {
  max-width: 780px;
  margin: 12px auto;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}
.alert-success { background: #e7f8ee; color: #0f5132; border: 1px solid #badbcc; }
.alert-error   { background: #fdecec; color: #842029; border: 1px solid #f5c2c7; }

/* ========== Footer (image + voile + plus grand) ========== */
.site-footer {
  position: relative;
  overflow: hidden;

  color: #ffffff;
  background-color: var(--royal);
  background-image: url("image-footer.webp"); /* minuscule = ton zip */
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  border-top: 1px solid var(--nav-border);
  min-height: 220px; /* plus grand */
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--footer-overlay);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  padding: 56px 16px; /* plus haut */
  text-align: center;
  font-weight: 700;
}

.site-footer a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== Responsive ========== */
@media (max-width: 860px) {
  .theme-switch__label { display: none; }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }

  .navbar {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  /* Cache le menu par défaut en mobile */
  .navbar-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 6px;
  }

  .navbar-menu.show {
    display: flex;
  }

  .navbar-menu a {
    width: 100%;
    justify-content: center;
  }

  /* Sur mobile, on met les actions dans le menu */
  .desktop-only { display: none; }
  .mobile-only { display: block; }

  .form-row {
    grid-template-columns: 1fr;
  }

  main {
    padding-bottom: 38px;
  }
}

@media (max-width: 420px) {
  .logo-nav { height: 38px; }
  .home-logo { height: 150px; }
}
input[readonly] {
  background: color-mix(in srgb, var(--field-bg) 70%, #9ca3af 30%);
  cursor: not-allowed;
}
form input[readonly] {
  background: #d1d5db !important;
  cursor: not-allowed;
}
/* Champ Sujet suggestion */
input[readonly][name="sujet"] {
  text-transform: uppercase;
  font-weight: 700;
  color: #86a84a; /* vert sauge */
}
html[data-theme="dark"] input[readonly][name="sujet"] {
  color: #9cc56b;
}
.checkbox {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
font-size: 0.9rem;
}
.footer-links {
display: flex;
flex-wrap: wrap;
gap: 15px;
justify-content: center;
margin-bottom: 10px;
}

.footer-links a {
color: white;
text-decoration: none;
font-size: 0.9rem;
}

.footer-links a:hover {
text-decoration: underline;
}
/* Fix débordement horizontal sur mobile */
html, body {
  width: 100%;
  overflow-x: hidden;
}

/* Sécurité : éviter qu'une image/élément dépasse l'écran */
img, svg {
  max-width: 100%;
  height: auto;
}
/* ===== Fix iPhone : débordement horizontal (logo header trop large) ===== */

/* Le conteneur logo ne doit jamais dépasser l'écran */
.logo-area {
  max-width: 240px;
  overflow: hidden;
}

/* Le logo lui-même ne doit pas dépasser */
.logo-nav {
  max-width: 220px;
}

/* En mobile : on réduit encore */
@media (max-width: 760px) {
  .logo-area { max-width: 190px; }
  .logo-nav  { max-width: 170px; }

  /* autorise les éléments du header à se comprimer sans créer de scroll */
  .nav-left { min-width: 0; }
}
.navbar { overflow-x: clip; }