/* =========================================================
   1. VARIABLES (SOURCE UNIQUE DE COULEURS)
   ========================================================= */
:root {
  /* Global */
  --bg-main: linear-gradient(180deg, #0b1220, #0f1724);
  --bg-card: rgba(255,255,255,0.04);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #E6CD95;  
  
  /* Modal */
  --modal-bg: rgba(15,23,36,0.96);
  --modal-text: #e5e7eb;
  --modal-muted: rgba(229,231,235,0.75);
  --modal-border: rgba(255,255,255,0.10);
  --modal-surface: rgba(255,255,255,0.06);
  --modal-overlay: rgba(0,0,0,0.55);
  --modal-icon-bg: rgba(0,0,0,0.18);

  /* Navbar */
  --nav-bg: rgba(15,23,36,0.9);
  --nav-text: #E6CD95;
  --nav-accent: #875E36;

  /* Layout */
  --radius: 12px;
  --container: 1100px;
  --nav-height: 65px;
}

/* MODE LIGHT */
html.light {
  --bg-main: linear-gradient(180deg, #f8fafc, #eef2ff);
  --bg-card: #ffffff;
  --text-main: #0b1220;
  --text-muted: #475569;
  --accent: #E6CD95;

  --nav-bg: rgba(255,255,255,0.9);
  --nav-text: #875E36;
  --nav-accent: #E6CD95;

  /* Modal (light) */
  --modal-bg: rgba(255,255,255,0.96);
  --modal-text: #0b1220;
  --modal-muted: rgba(71,85,105,0.85);
  --modal-border: rgba(11,17,32,0.12);
  --modal-surface: rgba(11,17,32,0.06);
  --modal-overlay: rgba(11,17,32,0.45);
  --modal-icon-bg: rgba(11,17,32,0.06);
}




/* =========================================================
   2. RESET
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.45;
  transition: background 0.6s ease, color 0.4s ease;
}

/* =========================================================
   3. CONTAINER
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================================
   4. HEADER / NAVBAR
   ========================================================= */
.site-header {
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  transition: background 0.4s ease, border-color 0.4s ease;
}

html.ligh .site-header {
  border-bottom: 1px solid rgba(11,17,32,0.08);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header,
header.site-header,
.topbar,
.navbar{
  position: relative;
  z-index: 200;
}

.topbar-user,
.topbar-user-menu,
.user-menu,
.account-menu{
  position: relative;
  z-index: 300;
}

/* =========================================================
   5. LOGO
   ========================================================= */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 0.95rem;
  white-space: nowrap;
}

/* =========================================================
   6. NAVIGATION
   ========================================================= */
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav a {
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-text);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 12px;
  width: 0;
  height: 2px;
  background: var(--nav-accent);
  transition: width 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--nav-accent);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* =========================================================
   7. ACTIONS NAVBAR (DROITE)
   ========================================================= */
.nav-actions {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  height: 36px;
  width: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--nav-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.15);
  color: var(--nav-accent);
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* =========================================================
   7bis. BOUTON GALERIE (📁 Galerie client)
   ========================================================= */
.gallery-btn {
  width: auto;
  padding: 0 0.75rem;
  margin-right: 2.85rem;
  gap: 0.4rem;
  font-size: 13px;
}

.gallery-icon {
  font-size: 16px;
  line-height: 1;
}

.gallery-text {
  white-space: nowrap;
  font-weight: 500;
}

/* Bouton thème */
.theme-toggle {
  font-size: 18px;
  transition: transform 0.6s ease;
}

html.ligh .theme-toggle {
  transform: rotate(360deg);
}

/* Bouton admin */
.admin-btn {
  width: auto;
  padding: 0 0.75rem;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
}

/* =========================================================
   8. CONTENU
   ========================================================= */
.hero {
  padding: 4rem 0;
}

.lead {
  color: var(--text-muted);
}

.card {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  transition: background 0.4s ease;
}

/* =========================================================
   9. FORMULAIRES  ✅ CORRIGÉ
   ========================================================= */
label {
  color: var(--text-muted);
}

/* ✅ On ne stylise PLUS "tous les input" (sinon checkbox cassée) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--text-main);
}

/* ✅ Neutralise checkbox / radio */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: var(--accent);
}

/* =========================================================
   10. RESPONSIVE
   ========================================================= */
@media (max-width: 480px) {
  .logo-text {
    display: none;
  }

  .logo img {
    height: 32px;
  }

  .nav a {
    font-size: 12px;
  }

  .admin-btn {
    display: none;
  }
}

/* ===== Dropdown Compte (hover/focus) ===== */
.topbar-user{
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Le menu */
.topbar-user-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;

  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);

  padding: 6px;
  display: none;

  z-index: 2000;
}

/* Liens */
.topbar-user-item{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--modal-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
}

.topbar-user-item:hover{
  background: var(--modal-surface);
}

.topbar-user-item:active{
  background: var(--modal-surface);
}

/* Bouton dans le menu compte = même style qu'un lien */
.topbar-user-menu button.topbar-user-item{
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

/* Bouton dropdown : même hover/active que les liens */
.topbar-user-menu button.topbar-user-item:hover{
  background: rgba(255,255,255,0.08);
}

.topbar-user-menu button.topbar-user-item:active{
  background: rgba(255,255,255,0.12);
}

.topbar-user-item--static{
  cursor: default;
  opacity: .9;
}
.topbar-user-item--static:hover{
  background: transparent;
}

/* Affichage au hover + clavier */
.topbar-user:hover .topbar-user-menu,
.topbar-user:focus-within .topbar-user-menu{
  display: block;
}

/* Petit “caret” optionnel (flèche) */
.topbar-user-menu::before{
  content: "";
  position: absolute;
  top: -6px;
  right: 12px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: var(--modal-bg);
  border-left: 1px solid var(--modal-border);
  border-top: 1px solid var(--modal-border);
}

.topbar-user-sep{
  height: 1px;
  margin: 6px;
  background: var(--modal-border);
  border-radius: 999px;
}

.modal__success{
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #0f7b3a;
  background: rgba(15, 123, 58, 0.12);
  border: 1px solid rgba(15, 123, 58, 0.25);
  font-weight: 700;
}


/* =========================================================
   11. UTILITAIRES
   ========================================================= */
.hidden {
  display: none !important;
}

/* ===== MODAL (popup) ===== */
.modal{
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}

.modal.is-open{
  display: block;
}

.modal__overlay{
  position: absolute;
  inset: 0;
  background: var(--modal-overlay);
}

.modal__dialog{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 28px));

  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);

  padding: 18px 18px 16px;
  color: var(--modal-text);
}

.modal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  height: 34px;
  width: 34px;
  border-radius: 10px;
  border: 1px solid var(--modal-border);
  background: var(--modal-surface);
  color: var(--modal-text);
  cursor: pointer;
}

.modal__title{
  margin: 4px 0 2px;
  font-size: 1.1rem;
  font-weight: 800;
}

.modal__subtitle{
  margin: 0 0 14px;
  color: var(--modal-muted);
  font-size: 0.9rem;
}

.modal__form{
  display: grid;
  gap: 10px;
}

.modal__label{
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--modal-muted);
}

.modal__input{
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--modal-border);
  background: var(--modal-surface);
  color: var(--modal-text);
  padding: 0 12px;
  outline: none;
}

.modal__input:focus{
  border-color: rgba(230,205,149,0.55);
}

/* ✅ Fix checkbox alignement dans le modal */
.modal__check{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--modal-text);
  user-select: none;
  margin-top: 2px;
}

.modal__check input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 0;
}

.modal__actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.modal__btn{
  height: 38px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 0 14px;
  font-weight: 800;
}

.modal__btn--ghost{
  background: var(--modal-surface);
  color: var(--modal-text);
  border: 1px solid var(--modal-border);
}

.modal__btn--primary{
  background: rgba(230,205,149,0.92);
  color: #0b1220;
}

.modal__hint{
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--modal-muted);
}

/* Bloque le scroll quand une modal est ouverte */
html.modal-open,
body.modal-open {
  overflow: hidden;
}

/* Empêche le scroll du site quand un modal est ouvert */
body.modal-open {
  overflow: hidden;
}

/* Message d'erreur (rouge) */
.modal__error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #b00020;                 /* rouge lisible */
  background: rgba(176, 0, 32, .10);
  border: 1px solid rgba(176, 0, 32, .25);
  font-weight: 600;
}

.modal__field{
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--modal-border);
  background: var(--modal-surface);
  overflow: hidden;
}

.modal__icon{
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--modal-icon-bg);
  border-right: 1px solid rgba(255,255,255,0.08);
  color: var(--modal-text);
  font-size: 16px;
}

.modal__input--with-icon{
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 12px;
}

.modal__field:focus-within{
  border-color: rgba(230,205,149,0.55);
  box-shadow: 0 0 0 2px rgba(230,205,149,0.18);
}

.modal__input--with-icon:focus{
  outline: none;
}

.modal__footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--modal-border);
}

.modal__link{
  /* reset bouton */
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;

  /* look "link" */
  color: var(--modal-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal__link:hover{
  text-decoration: underline;
  color: var(--modal-text);
}

.modal__link--accent{
  color: var(--accent);
}

.modal__link--accent span{
  text-decoration: underline;
}

.modal__link:focus-visible{
  outline: 2px solid rgba(230,205,149,0.55);
  outline-offset: 3px;
  border-radius: 8px;
}

/* sécurité au cas où */
[hidden]{ display:none !important; }

@media (max-width: 420px){
  .modal__footer{
    flex-direction: column;
    align-items: flex-start;
  }
}

.modal__link--accent:hover{
  color: var(--accent);
  text-decoration: underline;
}

.modal__field--pw{
  grid-template-columns: 44px 1fr 44px;
}

.modal__pw-toggle{
  height: 100%;
  width: 44px;
  border: 0;
  background: var(--modal-icon-bg);
  color: var(--modal-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal__pw-toggle:hover{
  background: rgba(255,255,255,0.10);
}

.modal__pw-toggle:active{
  background: rgba(255,255,255,0.14);
}

.modal__pw-toggle:focus{
  outline: none;
}

.modal__resend{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 8px;
}

.modal__timer{
  font-size: 0.82rem;
  color: var(--modal-muted);
}

.modal__link-btn{
  background: none;
  border: none;
  padding: 0;
  font-weight: 800;
  cursor: pointer;
  color: rgba(230,205,149,0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal__link-btn:hover{
  color: rgba(230,205,149,1);
}

.modal__link-btn[disabled]{
  opacity: .6;
  cursor: not-allowed;
}

/* ===== Checkbox légale inscription ===== */
.modal__check--legal{
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 4px;
  line-height: 1.55;
  color: var(--modal-text);
}

.modal__check--legal input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.modal__check-text{
  display: block;
}

.modal__check--legal a{
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.modal__check--legal a:hover{
  color: var(--accent);
  opacity: 0.92;
}

.modal__check--legal a:focus-visible{
  outline: 2px solid rgba(230,205,149,0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================
   FOOTER PREMIUM
   ========================================================= */
.site-footer{
  margin-top: 0;
  padding: 56px 0 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, #0d1624 0%, #0c1522 100%);
  transition: background 0.4s ease, border-color 0.4s ease;
}

html.light .site-footer{
  border-top: 1px solid rgba(11,17,32,0.08);
  background:
    linear-gradient(180deg, #edf2f8 0%, #e7edf5 100%);
}

/* Grille principale */
.footer-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 1fr;
  gap: 2.2rem;
  align-items: start;
}

.footer-col{
  min-width: 0;
}

.footer-col--brand{
  padding-right: 1rem;
}

.footer-brand{
  display: inline-flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
}

.footer-brand__title{
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.footer-brand__text{
  max-width: 280px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.footer-title{
  margin: 0 0 1rem;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Liens */
.footer-links{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

.footer-link::before{
  content: "▸";
  color: var(--accent);
  font-size: 0.9rem;
  transform: translateY(-1px);
}

.footer-link:hover{
  color: var(--text-main);
  transform: translateX(3px);
}

/* Réseaux */
.footer-socials{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-social{
  height: 42px;
  width: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-main);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

html.light .footer-social{
  background: rgba(11,17,32,0.05);
  border: 1px solid rgba(11,17,32,0.08);
}

.footer-social:hover{
  transform: translateY(-2px);
  color: var(--accent);
  background: rgba(255,255,255,0.10);
  border-color: rgba(230,205,149,0.25);
}

.footer-social svg{
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* Bloc avis */
.footer-review-card{
  display: inline-flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 220px;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(255,255,255,0.96);
  color: #0b1220;
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.footer-review-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
}

.footer-review-card__label{
  font-size: 0.95rem;
  font-weight: 600;
}

.footer-review-card__brand{
  font-size: 1rem;
  font-weight: 800;
  color: #00b67a;
}

.footer-small{
  margin: 0.8rem 0 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

/* Bas du footer */
.footer-bottom{
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

html.light .footer-bottom{
  border-top: 1px solid rgba(11,17,32,0.08);
}

.footer-copy{
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-copy strong{
  color: var(--text-main);
}

/* Version admin */
.site-footer--admin{
  padding: 26px 0 16px;
}

.footer-admin-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-admin-brand{
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--text-main);
}

.footer-admin-brand span{
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-admin-links{
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-admin-link{
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.25s ease;
}

.footer-admin-link:hover{
  color: var(--accent);
}

.footer-bottom--admin{
  margin-top: 1rem;
  padding-top: 1rem;
}

/* Responsive */
@media (max-width: 1100px){
  .footer-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .site-footer{
    padding: 42px 0 18px;
  }

  .footer-grid{
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-review-card{
    width: 100%;
    max-width: 320px;
  }

  .footer-admin-row{
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-admin-links{
    gap: 0.8rem;
  }

  .footer-bottom{
    text-align: left;
  }
}

/* =========================
   MAINTENANCE NOTICE
   ========================= */

.site-maintenance-notice{
  position: relative;
  z-index: 40;
  padding: 10px 0;
  color: #fff5f5;
  background:
    linear-gradient(180deg, rgba(153, 27, 27, 0.96), rgba(127, 29, 29, 0.96));
  border-top: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.22);
}

.site-maintenance-notice__inner{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.site-maintenance-notice__icon{
  flex: 0 0 auto;
  font-size: 1.15rem;
  line-height: 1.2;
}

.site-maintenance-notice__content{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  line-height: 1.55;
  font-size: 0.95rem;
}

.site-maintenance-notice__content strong{
  color: #ffffff;
}

@media (max-width: 720px){
  .site-maintenance-notice{
    padding: 12px 0;
  }

  .site-maintenance-notice__content{
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.92rem;
  }
}