html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background-color: #0b0c10;
  color: #f1f1f1;
  line-height: 1.6;
}

/* ===== Form Rikalia Safe ===== */
.contact-form { --bg:#101010; --fg:#f2f2f2; --muted:#bfbfbf; --edge:#2a2a2a; --brand:#00e6a0; }
.contact-form h2 { text-align:center; margin-bottom: 1.25rem; }

.rs-form { max-width: 780px; margin: 0 auto; }
.rs-form .row { margin-bottom: 14px; }
.rs-form .row.two { display:flex; gap: 14px; }
.rs-form .row.two > * { flex: 1 1 0; min-width: 0; }

.rs-form input[type="text"],
.rs-form input[type="email"],
.rs-form input[type="tel"],
.rs-form select,
.rs-form textarea {
  width:100%;
  background: var(--bg);
  color: var(--fg);
  border:1px solid var(--edge);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.rs-form textarea { resize: vertical; }
.rs-form ::placeholder { color: var(--muted); }

.radio-group { display:flex; gap: 18px; flex-wrap: wrap; }
.radio-group input { transform: translateY(1px); margin-right: 6px; }
.label { display:block; margin-bottom: 6px; color:var(--muted); }

.rs-form .btn-primary {
  background: var(--brand);
  color:#052317;
  border:0; border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700; cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
  width:100%;
}
.rs-form .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }

.notice { max-width: 780px; margin: 0 auto 12px; padding:12px 14px; border-radius:12px; border:1px solid #2a2a2a; }
.notice.success { background:#0f231b; color:#b6ffd9; border-color:#1f704d; }
.notice.error   { background:#2a1212; color:#ffd0d0; border-color:#7a2a2a; }

.rs-form .rgpd { font-size:.95rem; color:var(--muted); }

/* Responsive */
@media (max-width:768px){
  .rs-form .row.two { flex-direction: column; }
}



.hero { text-align:center; padding:6rem 2rem; background: radial-gradient(circle at center, #1c1c1c, #0a0a0a); }
.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; color: #ccc; }

section.section { padding: 4rem 2rem; max-width: 1200px; margin: 2rem auto; background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
  border-radius: 16px; box-shadow: 0 8px 24px rgba(0,255,144,0.05), inset 0 1px 0 rgba(255,255,255,0.02); }
section.section:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,255,144,0.1), inset 0 1px 0 rgba(255,255,255,0.05); transition: all .3s ease; }
h2.section-title { text-align:center; font-size:2rem; margin-bottom:2rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.card { background-color: #1b1c22; padding: 2rem; border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.image-gallery { display:flex; justify-content:center; align-items:center; gap:2rem; flex-wrap:nowrap; padding:3rem;
  background-image:url('data:image/svg+xml;utf8,<svg width="140" height="140" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="0.5" fill="%2300ff90" opacity="0.05"/></svg>');
  background-repeat:repeat; background-size:60px 60px; border-radius:20px; overflow-x:auto; }
.image-gallery img { max-width:280px; border-radius:16px; transition: transform .4s ease; cursor: zoom-in; }
.image-gallery img:hover { transform: scale(1.4); z-index:10; }

.video video { width:100%; border-radius:12px; margin-top:2rem; }

form.contact-form { display:flex; flex-direction:column; max-width:600px; margin: 0 auto; }
form.contact-form input, form.contact-form textarea, form.contact-form select {
  padding: 1rem; margin-bottom: 1rem; border-radius: 12px; border: none; font-size: 1rem; }
form.contact-form button { background-color:#00e6a0; color:#000; font-weight:600; padding:1rem; border:none; border-radius:10px; cursor:pointer; }

.site-footer { background-color:#101010; text-align:center; padding:2rem; font-size: .95rem; color:#aaa; }
table { border-collapse: collapse; }
table.pricing th, table.pricing td { padding:.75rem 1rem; text-align:center; }
table.pricing { background:#1a1a1a; border-radius:12px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); margin: 0 auto; }



/* --- Sécurité responsive globale --- */
*,*::before,*::after { box-sizing: border-box; }
html, body { width:100%; overflow-x:hidden; }
img, video { max-width:100%; height:auto; }

/* Conteneurs : pas plus large que l'écran en mobile */
@media (max-width: 768px){
  .container { width:100%; max-width:100%; padding-left:12px; padding-right:12px; }
}

/* --- TABLEAU TARIFS : mobile friendly --- */
/* Si ton tableau a déjà une classe, remplace `table.pricing-table` par la tienne.
   Sinon, laisse ces sélecteurs génériques. */
.section table,
table.pricing-table {
  width:100%;
  border-collapse: collapse;
  table-layout: auto;        /* laisse le navigateur compacter */
}

/* Empêche le débordement horizontal sur mobile en rendant le tableau scrollable */
@media (max-width: 768px){
  .section table,
  table.pricing-table {
    display:block;                 /* permet l'overflow sur le tableau */
    overflow-x:auto;               /* défilement horizontal au besoin */
    -webkit-overflow-scrolling:touch;
    border-spacing:0;
  }
  .section thead,
  .section tbody,
  .section tr { width:100%; }
  .section th,
  .section td {
    white-space: nowrap;           /* évite les retours moches dans les € */
    padding:12px 10px;
    font-size: 0.95rem;            /* texte un peu plus compact */
  }
}

/* Option : compacter un peu les gros titres de section en mobile */
@media (max-width: 480px){
  .section h2 { font-size: 1.6rem; line-height:1.2; }
}


/* ----- Conteneur global aligné ----- */
.container,
header.site-header .container,
.section .container {
  max-width: 1160px;      /* ajuste 1080–1240 selon ton goût */
  margin-inline: auto;
  padding-inline: 20px;
}

/* Le header reste plein écran mais son contenu est centré */
header.site-header { width: 100%; }



/* ===== Form Rikalia Safe ===== */
.contact-form { --bg:#101010; --fg:#f2f2f2; --muted:#bfbfbf; --edge:#2a2a2a; --brand:#00e6a0; }
.contact-form h2 { text-align:center; margin-bottom: 1.25rem; }

.rs-form { max-width: 780px; margin: 0 auto; }
.rs-form .row { margin-bottom: 14px; }
.rs-form .row.two { display:flex; gap: 14px; }
.rs-form .row.two > * { flex: 1 1 0; min-width: 0; }

.rs-form input[type="text"],
.rs-form input[type="email"],
.rs-form input[type="tel"],
.rs-form select,
.rs-form textarea {
  width:100%;
  background: var(--bg);
  color: var(--fg);
  border:1px solid var(--edge);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.rs-form textarea { resize: vertical; }
.rs-form ::placeholder { color: var(--muted); }

.radio-group { display:flex; gap: 18px; flex-wrap: wrap; }
.radio-group input { transform: translateY(1px); margin-right: 6px; }
.label { display:block; margin-bottom: 6px; color:var(--muted); }

.rs-form .btn-primary {
  background: var(--brand);
  color:#052317;
  border:0; border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700; cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
  width:100%;
}
.rs-form .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }

.notice { max-width: 780px; margin: 0 auto 12px; padding:12px 14px; border-radius:12px; border:1px solid #2a2a2a; }
.notice.success { background:#0f231b; color:#b6ffd9; border-color:#1f704d; }
.notice.error   { background:#2a1212; color:#ffd0d0; border-color:#7a2a2a; }

.rs-form .rgpd { font-size:.95rem; color:var(--muted); }

/* Responsive */
@media (max-width:768px){
  .rs-form .row.two { flex-direction: column; }
}

/* Inline errors */
.field-error { 
  margin-top: 6px; font-size: .92rem; color: #ffb7b7; display:none;
}
.is-invalid { border-color: #e57373 !important; box-shadow: 0 0 0 2px rgba(229,115,115,.15); }
.rs-form .row.has-error .field-error { display:block; }

/* === Formulaire : style homogène === */
.rs-form { max-width: 780px; margin: 0 auto; }
.rs-form .row { margin-bottom: 14px; }
.rs-form .row.two { display:flex; gap:14px; }
.rs-form .row.two > * { flex:1 1 0; min-width:0; }

.rs-form input[type="text"],
.rs-form input[type="email"],
.rs-form input[type="tel"],
.rs-form select,
.rs-form textarea{
  width:100%;
  appearance:none;
  -webkit-appearance:none;
  background:#101010;
  color:#f2f2f2;
  border:1px solid #2a2a2a;
  border-radius:14px;
  padding:14px 16px;
  height:56px;               /* hauteur homogène */
  line-height:1.2;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.rs-form textarea{ height:auto; min-height:140px; padding:14px 16px; }
.rs-form ::placeholder{ color:#bfbfbf; }

/* Messages sous champ */
.field-error{ display:none; margin-top:6px; font-size:.92rem; color:#ffb7b7; }

/* Etats erreur / succès avec icône */
.is-invalid{
  border-color:#e26a6a !important;
  box-shadow:0 0 0 2px rgba(226,106,106,.14);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e26a6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:14px;
}
.is-valid{
  border-color:#1ed19b !important;
  box-shadow:0 0 0 2px rgba(30,209,155,.14);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231ed19b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:14px;
}

/* Affichage des messages d’erreur */
.rs-form .row.has-error .field-error{ display:block; }

/* Mobile */
@media (max-width:768px){
  .rs-form .row.two{ flex-direction:column; }
}

/* === Effet shake (vibration légère sur erreur) === */
@keyframes shakeField {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.is-invalid {
  animation: shakeField 0.25s ease-in-out;
}

/* Petite amélioration visuelle sur focus après erreur */
.is-invalid:focus {
  border-color: #ff8b8b !important;
  box-shadow: 0 0 0 3px rgba(255, 139, 139, 0.2);
}

/* ===== Contact – Harmonisation Appeler ===== */
:root{
  --rs-green:#00e6a0;         /* vert Rikalia Safe */
  --rs-green-ink:#052317;     /* texte sur vert */
  --rs-bg:#0f0f0f;            /* fond sombre */
  --rs-edge:#2a2a2a;
  --rs-fg:#f2f2f2;
  --rs-muted:#bfbfbf;
}

/* Ligne d’info sous le formulaire (Option 1) */
.contact-info {
  text-align:center;
  margin-top:1rem;
  color:var(--rs-muted);
  font-size:.95rem;
}
.contact-info a{
  color:var(--rs-green);
  text-decoration:none;
  font-weight:700;
  border-bottom:1px solid transparent;
  transition:color .2s ease, border-color .2s ease;
}
.contact-info a:hover{
  color:#61ffd1;
  border-color:#61ffd1;
}

/* Bandeau fixe mobile (Option 3) */
.callbar {
  position:fixed;
  left:0; right:0; bottom:0;
  display:flex; align-items:center; justify-content:center; gap:.5rem;
  background:var(--rs-green);
  color:var(--rs-green-ink);
  font-weight:800;
  padding:.7rem 1rem;
  box-shadow:0 -6px 20px rgba(0,0,0,.45);
  z-index:999;
}
.callbar a{
  color:var(--rs-green-ink);
  text-decoration:none;
  display:flex; align-items:center; gap:.5rem;
  font-size:1rem;
}
.callbar svg { width:18px; height:18px; }

/* Évite que le bandeau masque le bas de page */
.has-callbar { padding-bottom:56px; }

/* Bouton flottant “Appeler” (mobile) */
.call-fab{
  position:fixed; right:16px; bottom:72px;    /* au-dessus de la callbar */
  width:56px; height:56px; border-radius:50%;
  background:var(--rs-green);
  color:var(--rs-green-ink);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 24px rgba(0,0,0,.45);
  z-index:1000;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.call-fab:hover{ transform:translateY(-2px); filter:brightness(1.05); }
.call-fab svg{ width:22px; height:22px; }

/* Petit halo “pulse” discret */
.call-fab::after{
  content:"";
  position:absolute; inset:-6px;
  border-radius:inherit;
  box-shadow:0 0 0 0 rgba(0,230,160,.35);
  animation:rs-pulse 1.8s ease-out infinite;
}
@keyframes rs-pulse{
  0%   { box-shadow:0 0 0 0 rgba(0,230,160,.35); }
  70%  { box-shadow:0 0 0 14px rgba(0,230,160,0); }
  100% { box-shadow:0 0 0 0 rgba(0,230,160,0); }
}

/* Affichage : mobile uniquement pour callbar + fab */
@media (min-width: 769px){
  .callbar, .call-fab { display:none; }
}

/* Accessibilité, réduit les animations si demandé */
@media (prefers-reduced-motion: reduce){
  .call-fab::after{ animation:none; }
  .call-fab, .callbar, .contact-info a{ transition:none; }
}

/* Desktop: ne jamais afficher les éléments mobile-only */
.callbar,
.call-fab { display: none !important; }

@media (max-width: 768px){
  /* Mobile: on affiche */
  .callbar { display: flex !important; }
  .call-fab { display: flex !important; }
}

/* Le padding-bottom pour laisser la place au bandeau uniquement sur mobile */
@media (min-width: 769px){
  .has-callbar { padding-bottom: 0 !important; }
}

 /* Ligne téléphone sous formulaire : même largeur que le formulaire */
.rs-form + .contact-info{
  max-width: 780px;
  margin: 12px auto 0;
  opacity: .9;
}
.rs-form + .contact-info svg{
  width: 16px; height: 16px; vertical-align: -2px; opacity: .8;
  margin-right: 6px;
}


/* --- Ligne téléphone sous formulaire : plus grande en desktop --- */
@media (min-width: 1024px){
  .rs-form + .contact-info{
    max-width: 780px;
    margin: 14px auto 0;
    font-size: 1.35rem;      /* ⇐ taille plus grande */
    letter-spacing: .2px;
  }
  .rs-form + .contact-info a{ font-size: 1.35rem; }
}

/* --- Téléphone flottant (desktop only) --- */
@media (min-width: 1024px){
  .desk-call{
    position: fixed;
    right: 20px;
    bottom: 40vh;           /* ⇐ mets 40vh si tu le veux au milieu de l’écran */
    z-index: 998;
  }
  .desk-call_btn{
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--rs-green);
    color: var(--rs-green-ink);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0,0,0,.45);
    transition: transform .18s ease, filter .18s ease;
  }
  .desk-call_btn:hover{ transform: translateY(-2px); filter: brightness(1.05); }
  .desk-call_btn svg{ width: 24px; height: 24px; }

  .desk-call_bubble{
    position: absolute; right: 70px; bottom: 6px;
    background: #0d0d0d; color: #fff;
    border: 1px solid #1ee3ad; border-radius: 12px;
    padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
    opacity: 0; transform: translateY(6px);
    pointer-events: none; transition: all .18s ease;
    white-space: nowrap;
  }
  .desk-call:hover .desk-call_bubble,
  .desk-call:focus-within .desk-call_bubble{
    opacity: 1; transform: translateY(0); pointer-events: auto;
  }
  .desk-call_bubble::after{
    content: ""; position: absolute; right: -8px; bottom: 14px;
    width: 10px; height: 10px; background: #0d0d0d;
    border-right: 1px solid #1ee3ad; border-top: 1px solid #1ee3ad;
    transform: rotate(45deg);
  }
  .desk-call_bubble strong{ color: var(--rs-green); font-size: 1.2rem; margin-right: 6px; }
  .desk-call_bubble a{ color: #d7fff2; font-weight: 700; text-decoration: none; }
}

/* On garde tes éléments mobile : ils restent masqués en desktop */
@media (min-width: 769px){
  .callbar, .call-fab { display: none !important; }
}

/* Sécurité: masquer totalement le bouton/bulle desktop par défaut */
.desk-call,
.desk-call_btn,
.desk-call_bubble { display: none !important; }

/* Afficher le bouton/bulle desktop uniquement sur grand écran */
@media (min-width: 1024px){
  .desk-call { display: block !important; }
  .desk-call_btn { display: flex !important; }
  .desk-call_bubble { display: block !important; }
}

/* Mobile: ne garder que callbar + fab */
@media (max-width: 768px){
  .callbar { display: flex !important; }
  .call-fab { display: flex !important; }
}

/* Desktop: cacher callbar + fab */
@media (min-width: 769px){
  .callbar, .call-fab { display: none !important; }
}

/* Esthétique (au cas où) */
.desk-call_bubble a{ text-decoration:none; }
.contact-info a{ white-space:nowrap; } /* évite la coupure du numéro sur 2 lignes */

/* ===== Témoignages (Avis Google) ===== */
#temoignages.section { padding: 3rem 0 2rem; }
#temoignages .section-title{
  text-align:center; font-size:2rem; margin-bottom:.25rem;
}
#temoignages .section-lead{
  text-align:center; color:#bfbfbf; margin:0 0 1.5rem;
}

/* Contrainte de largeur pour rester aligné au formulaire */
#temoignages .reviews-wrap,
#temoignages .reviews-grid{ max-width: 980px; margin: 0 auto; }

/* Fallback grid (si pas de widget) */
.reviews-grid{
  display:grid; gap:1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
}
.review{
  background:#121212; border:1px solid #1f1f1f; border-radius:14px;
  padding:1rem; box-shadow:0 6px 20px rgba(0,0,0,.25);
}
.review .stars{ color:#00e6a0; letter-spacing:2px; font-weight:800; margin-bottom:.5rem; }
.review .byline{ color:#9a9a9a; margin-top:.5rem; font-size:.95rem; }

/* Harmonisation de certains widgets Trustindex en dark mode */
.trustindex-widget, .ti-widget{
  --ti-color-primary: #00e6a0; /* vert Rikalia */
  --ti-text: #f2f2f2;
}
.ti-review, .ti-widget, .ti-header{
  color:var(--ti-text) !important;
}

/* ===== HEADER Rikalia Safe – version stable ===== */

header.site-header {
  width: 100%;
  background: #0b0b0b;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* === LOGO & NOM === */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  height: 100px;
  width: auto;
}
.brand-name {
  color: #00ffb3;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.6rem;
}

/* Ajuste sur mobile */
@media (max-width: 900px) {
  .brand img { height: 80px; }
  .brand-name { font-size: 1.3rem; }
}

/* === NAVIGATION – DESKTOP === */
#primary-menu {
  flex: 1 1 auto;
  margin-left: auto;
}
#primary-menu .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}
#primary-menu .menu li { position: relative; }
#primary-menu .menu a {
  text-decoration: none;
  color: #f2f2f2;
  font-weight: 700;
  padding: 10px 6px;
  transition: color .2s ease;
}
#primary-menu .menu a:hover {
  color: #00ffb3;
}

/* Sous-menu desktop */
.sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  min-width: 240px;
  padding: 8px 0;
  list-style: none;
  margin: 8px 0 0 0;
  display: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.sub-menu li { list-style: none; }
.sub-menu a {
  display: block;
  padding: 10px 16px;
  color: #fff;
}
.sub-menu a:hover {
  background: #151515;
  color: #00ffb3;
}

/* Hover pour desktop */
@media (min-width: 901px) {
  .has-sub:hover > .sub-menu { display: block; }
  .has-sub .sub-toggle { display: none; }
}

/* === NAVIGATION – MOBILE === */
@media (max-width: 900px) {
  header.site-header .container {
    position: relative;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Bouton burger */
  .menu-toggle {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
  }
  .menu-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
  }

  /* Menu caché par défaut */
  #primary-menu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: #0f0f0f;
    border-top: 1px solid #2a2a2a;
    transition: max-height .25s ease;
  }

  #primary-menu[data-open="true"] {
    max-height: 80vh;
    overflow-y: auto;
  }

  #primary-menu .menu {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
    gap: 12px;
  }

  #primary-menu .menu a {
    display: block;
    width: 100%;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  /* Sous-menu mobile */
  .has-sub { width: 100%; position: relative; }
  .has-sub .sub-toggle {
    position: absolute;
    right: 10px;
    top: 8px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    z-index: 1002;
  }
  .has-sub .sub-menu {
    position: static;
    display: none;
    border-left: 2px solid #222;
    margin: 4px 0 0 8px;
    padding-left: 12px;
  }
  .has-sub.open > .sub-menu { display: block; }
}

/* === Correction ancrage (scroll vers le haut du conteneur) === */
[id] { scroll-margin-top: 120px; }
@media (max-width: 900px) {
  [id] { scroll-margin-top: 90px; }
}
/* === FIX 1 : Desktop menu horizontal, sans puces === */
@media (min-width:901px){
  /* annule tout style parasite du thème */
  nav#primary-menu ul.menu,
  nav#primary-menu ul.menu li{
    list-style: none !important;
  }
  nav#primary-menu ul.menu{
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  nav#primary-menu ul.menu > li{
    display: inline-block !important; /* évite l’empilement vertical */
  }
  nav#primary-menu ul.menu > li > a{
    display: inline-block !important;
    padding: 10px 6px !important;
    color: #f0f0f0 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
  }
  nav#primary-menu ul.menu > li > a:hover{
    color:#00ffb3 !important;
  }
}
/* === FIX 2 : Tailles/logo propres */
.site-header .brand img{
  height: 112px !important;   /* desktop */
  width: auto !important;
  display: block;
}
@media (max-width:900px){
  .site-header .brand img{ height: 86px !important; }  /* mobile */
}

/* centre la marque sur mobile */
@media (max-width:900px){
  .site-header .brand{ width:100%; justify-content:center; }
}
/* === FIX 3 : Burger immobile à l’ouverture du menu === */
@media (max-width:900px){
  .menu-toggle{
    position: absolute !important;
    left: 10px !important;
    top: 14px !important;      /* au lieu de 50% */
    transform: none !important;
    z-index: 1001 !important;
  }
  /* garde la même position même quand le header "s'étire" */
  header.site-header.header-open .menu-toggle{
    top: 14px !important;
  }
}
/* === FIX 4 : Marge d'ancrage plus généreuse pour tomber sur le titre === */
:root{ --header-h: 130px; }             /* desktop */
@media (max-width:900px){
  :root{ --header-h: 160px; }           /* mobile : plus haut */
}

/* applique la marge à tous les éléments ciblés par #ancres */
[id]{ scroll-margin-top: var(--header-h) !important; }

/* === FIX GLOBAL HEADER — Rikalia Safe === */

/* Supprime le carré parasite (souvent dû au span.sr-only) */
.menu-toggle .sr-only {
  display: none !important;
}

/* Aligne proprement le header sur desktop */
header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 24px;
}

/* ---- LOGO ---- */
.site-header .brand img {
  height: 140px !important;    /* taille desktop augmentée */
  width: auto !important;
  display: block;
  margin-right: 10px;
}

/* Centrer le bloc logo + nom sur desktop */
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Ajuste la taille du nom pour s’harmoniser */
.site-header .brand-name {
  font-size: 1.65rem !important;
  font-weight: 800;
  color: #00ffb3;
}

/* ---- MENU DESKTOP ---- */
@media (min-width: 901px) {
  nav#primary-menu ul.menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 28px !important;
  }

  nav#primary-menu ul.menu li {
    display: inline-block !important;
  }

  nav#primary-menu ul.menu li a {
    color: #f1f1f1 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
  }

  nav#primary-menu ul.menu li a:hover {
    color: #00ffb3 !important;
  }
}

/* ---- MOBILE ---- */
@media (max-width: 900px) {
  /* centrage logo + texte */
  .site-header .brand {
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  /* logo un peu plus grand */
  .site-header .brand img {
    height: 100px !important;
  }

  /* bouton burger parfaitement centré verticalement */
  .menu-toggle {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 10px;
    background: transparent;
    border: 1px solid #2a2a2a;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .menu-toggle span {
    background: #fff;
    height: 2px;
    width: 24px;
    margin: 3px 0;
  }

  /* menu déroulant cohérent avec le logo */
  #primary-menu[data-open="true"] {
    border-top: 1px solid #2a2a2a;
    background: #0f0f0f;
    padding: 10px 0;
  }
}

/* ======= MENU DESKTOP — homogène & sans carré parasite ======= */
@media (min-width:901px){
  /* réinitialise tout style résiduel du thème */
  #primary-menu .menu,
  #primary-menu .menu li{ list-style: none !important; }
  #primary-menu .menu li::marker{ content: "" !important; } /* au cas où */
  #primary-menu .menu{
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important; /* menu bien calé à gauche du bloc nav */
    gap: 12px !important;                   /* espacement régulier */
    padding: 0 !important; margin: 0 !important;
  }
  #primary-menu .menu > li{ display:flex !important; align-items:center !important; }
  #primary-menu .menu > li > a{
    display:inline-block !important;
    padding: 12px 0 !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    color: #f2f2f2 !important;
    text-decoration: none !important;
  }
  /* focus propre (le petit carré venait d’un style focus) */
  #primary-menu .menu a:focus,
  #primary-menu .menu a:focus-visible{
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0,255,179,.25) inset !important;
    border-radius: 8px !important;
  }
  /* cache tout bouton mobile éventuel en desktop */
  .sub-toggle, .menu-toggle, .menu-toggle .sr-only{ display:none !important; }
}

/* ======= LOGO & MARQUE — tailles + écart adaptés ======= */
.site-header .brand img{ height: 124px !important; width:auto !important; display:block; }
.site-header .brand{ gap: 0px !important; }        /* réduit l’espace entre logo et nom */
.site-header .brand-name{ font-size: 1.7rem !important; }

/* Mobile : logo ok mais on resserre encore l’écart et on centre le burger */
@media (max-width:900px){
  .site-header .brand img{ height: 92px !important; }
  .site-header .brand{ gap: 6px !important; }       /* << moins d’espace logo/nom */
  .menu-toggle{
    position:absolute !important; left:12px !important; top:50% !important;
    transform:translateY(-50%) !important; width:44px !important; height:44px !important;
    background:transparent !important; border:1px solid #2a2a2a !important; border-radius:10px;
  }
  .menu-toggle span{ width:22px; height:2px; background:#fff; margin:3px 0; }
}

/* ======= ANCRAGES — marge exacte selon la hauteur du header ======= */
:root{ --header-h: 124px; }                 /* desktop */
@media (max-width:900px){ :root{ --header-h: 108px; } }  /* mobile */
[id]{ scroll-margin-top: var(--header-h) !important; }

@media (min-width:901px){
  .has-sub:hover   > .sub-menu,
  .has-sub:focus-within > .sub-menu,
  .has-sub .sub-menu:hover{
    display:block; /* reste ouvert si la souris passe du parent vers le sous-menu */
  }
}

:root{ --header-h: 124px; }                 /* hauteur header desktop */
@media (max-width:900px){
  :root{ --header-h: 108px; }               /* hauteur header mobile */
}

header.site-header{
  position: sticky; top:0; z-index:1200;    /* desktop = sticky */
}

@media (max-width:900px){
  header.site-header{
    position: fixed; top:0; left:0; right:0; z-index:1200;  /* mobile = FIXE */
  }
  body{ padding-top: var(--header-h); }     /* évite que le contenu passe sous le header fixe */
}

[id]{ scroll-margin-top: var(--header-h) !important; }

/* Mobile : resserre l’écart logo/nom */
@media (max-width:900px){
  .site-header .brand{ gap:6px !important; }
}

/* Desktop : espacement régulier du menu + supprime tout marqueur/carré parasite */
@media (min-width:901px){
  #primary-menu .menu,
  #primary-menu .menu li{ list-style:none !important; }
  #primary-menu .menu{ display:flex !important; gap:36px !important; padding:0 !important; margin:0 !important; }
  #primary-menu .menu > li{ display:flex !important; align-items:center !important; }
  #primary-menu .menu > li > a{
    display:inline-block !important; padding:12px 0 !important; line-height:1 !important;
    font-weight:700 !important; color:#f2f2f2 !important; text-decoration:none !important;
  }
  /* focus propre (évitait le “carré”) */
  #primary-menu .menu a:focus,
  #primary-menu .menu a:focus-visible{ outline:none !important; box-shadow:0 0 0 2px rgba(0,255,179,.22) inset !important; border-radius:8px; }
}

