/* ====== MENUS (VINTAGECAMERA) — PACK OPTIMISÉ ====== */
/* Variables (faciles à ajuster) */
:root{
  --menu-bg:           #e2d4b3;   /* fond sous-menus */
  --menu-text:         #4a2e16;   /* texte normal */
  --menu-sep:          rgba(0,0,0,.18);
  --submenu-hover-bg:  #e2d4b3;   /* fond au survol (identique au bg si voulu) */
  --submenu-hover-tx:  #b26b31;   /* texte au survol */
}

/* 1) 1er niveau */
.sp-megamenu-parent > li > a{ color:#f2e8d0; font-weight:600; }
.sp-megamenu-parent > li:hover > a,
.sp-megamenu-parent > li.active > a{ color:#fff; }
.sp-megamenu-parent > li+li > a{ border-left:1px solid rgba(255,255,255,.15); }

/* 2) Panneaux dropdown (niveaux 2 et 3) */
.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner{
  background:var(--menu-bg);
  border:1px solid var(--menu-sep);
  box-shadow:0 12px 28px rgba(0,0,0,.15);
  border-radius:2px;
  padding:4px 0;                 /* compact haut/bas */
  min-width:200px;               /* largeur colonne gauche (réduite) */
}
.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner > ul{ margin:0; }

.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-inner{
  background:var(--menu-bg);
  border:1px solid var(--menu-sep);
  border-left:1px solid var(--menu-sep);    /* légère séparation verticale */
  box-shadow:0 12px 28px rgba(0,0,0,.12);
  padding:4px 0;
  min-width:200px;                           /* largeur colonne droite */
}

/* 3) Items (niveaux 2 et 3) */
.sp-megamenu-parent .sp-dropdown li > a,
.sp-megamenu-parent .sp-dropdown-sub li > a{
  color:var(--menu-text);
  padding:12px 16px;             /* hauteur confortable */
  padding-left:20px !important;  /* +10px à gauche (ta valeur) */
  line-height:1.35;
  border-bottom:1px solid var(--menu-sep);
  white-space:nowrap;            /* colonnes compactes */
  transition:background-color .15s,color .15s;
}
.sp-megamenu-parent .sp-dropdown li:last-child > a{ border-bottom:0; }

/* 4) Hover / Focus (souris + clavier) */
.sp-megamenu-parent .sp-dropdown li:hover > a,
.sp-megamenu-parent .sp-dropdown li > a:hover,
.sp-megamenu-parent .sp-dropdown-sub li:hover > a,
.sp-megamenu-parent .sp-dropdown li > a:focus,
.sp-megamenu-parent .sp-dropdown-sub li > a:focus,
.sp-megamenu-parent .sp-dropdown li > a:focus-visible,
.sp-megamenu-parent .sp-dropdown-sub li > a:focus-visible{
  background:var(--submenu-hover-bg);
  color:var(--submenu-hover-tx) !important;
  text-decoration:none;
}
.sp-megamenu-parent .sp-dropdown li:hover > a span,
.sp-megamenu-parent .sp-dropdown li > a:hover span{
  color:var(--submenu-hover-tx) !important;
}
.sp-megamenu-parent .sp-dropdown li.active > a{
  background:var(--submenu-hover-bg);
  color:var(--submenu-hover-tx);
  font-weight:600;
}

/* 5) Alignement du sous-sous-menu + “pont” anti-perte de hover */
.sp-megamenu-parent .sp-dropdown li{ position:relative; } /* ancre locale */
.sp-megamenu-parent .sp-dropdown li > .sp-dropdown-sub{
  top:0; left:100%;
  margin-left:-1px;              /* supprime le “jour” entre colonnes */
  z-index:1001;
}
/* “Pont” pour ne pas perdre le hover lors du passage de souris */
.sp-megamenu-parent .sp-dropdown li.sp-has-child:hover::after{
  content:""; position:absolute; top:0; right:-10px; width:12px; height:100%;
}
/* ====== /MENUS (VINTAGECAMERA) ====== */


/* ===== Liens du CONTENU (zone #sp-main-body) ===== */
:root{
  --link-color:       #583718;
  --link-hover-color: #8b5a2b;
}

/* liens standards dans le contenu */
#sp-main-body a{
  color: var(--link-color);
  text-decoration: none;
  transition: color .15s ease, text-decoration-color .15s ease;
}

/* survol + navigation clavier */
#sp-main-body a:hover,
#sp-main-body a:focus-visible{
  color: var(--link-hover-color);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: .12em;
}

/* exclusions : boutons et liens stylés comme des boutons */
#sp-main-body a.btn,
#sp-main-body a[class*="btn"],
#sp-main-body .btn a,
#sp-main-body .sppb-btn,
#sp-main-body .sppb-btn a{
  color: inherit;
  text-decoration: none;
}

/* Cache l'affichage automatique des champs en haut de page article */
.com-content .fields-container,
.com-content .fields,
.com-content .field-entry { display:none !important; }

/* 1) Lien plein-largeur sur le 1er niveau */
.sp-megamenu-parent > li > a{
  display:block;            /* toute la “tuile” devient cliquable */
  height:100%;
}

/* 2) Lien plein-largeur sur les sous-menus (lignes) */
.sp-megamenu-parent .sp-dropdown li > a,
.sp-megamenu-parent .sp-dropdown-sub li > a{
  display:flex;             /* meilleure zone cliquable + centrage vertical */
  align-items:center;
  width:100%;
  box-sizing:border-box;    /* respecte les paddings existants */
}

/* 3) Sécurité : les “nolink” (ex. MARQUES) restent non cliquables */
.sp-megamenu-parent li.nolink > a[href="#"]{
  pointer-events:none;
  cursor:default;
}

/* Masquer flèches/pagination UNIQUEMENT pour le carrousel qui suit l'ancre */
#publicites-no-nav ~ * .pbck_carousel_controls,
#publicites-no-nav ~ * .pbck_carousel_controls *,
#publicites-no-nav ~ * .pbck_carousel_pagination {
  display: none !important;
}

/* Masquer les titres/légendes des vignettes UNIQUEMENT pour ce carrousel */
#publicites-no-nav ~ * .pbck_carousel_caption,
#publicites-no-nav ~ * .pbck_carousel_title,
#publicites-no-nav ~ * .pbck_carousel_text,
#publicites-no-nav ~ * .pbck_carousel_readmore,
#publicites-no-nav ~ * figcaption {
  display: none !important;
}

/* Remonte toutes les brand-cards au-dessus des overlays/titres */
a.brand-card{
  position: relative;
  z-index: 10;
  isolation: isolate;     /* garantit que ::before/::after restent visibles */
}

/* Masquer la nav "Article précédent / suivant" sitewide (Joomla/Helix) */

/* Joomla core (bas d’article) */
.pager.pagenav,
.pagenav,
.pagenav-prev,
.pagenav-next { display: none !important; }

/* Variantes de thèmes/Helix */
.post-navigation,
.article-navigation,
.sp-article-nav,
.sp-post-navigation,
.entry-navigation,
nav .nav-next,
nav .nav-previous { display: none !important; }

/* Liens isolés marqués rel prev/next (au cas où) */
a[rel="prev"],
a[rel="next"] { display: none !important; pointer-events: none !important; }


/* 10/11/25  élargir tous les menus déroulants principaux */
.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner {
  min-width: 260px;   /* teste 260, 280, etc. */
}

/* 12/11/25 Masquer le paddind en haut de body */
body #sp-main-body { 
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 22/11/25 gestion des menus hierachiques pour HISTOIRE */
/* ===== FIX: couleur de la page courante en marron foncé ===== */
.sp-megamenu-parent .sp-dropdown li.active > a,
.sp-megamenu-parent .sp-dropdown li.current > a,
.sp-megamenu-parent .sp-dropdown li.menu-current > a,
.sp-megamenu-parent .sp-dropdown li.item-current > a,
.sp-megamenu-parent .sp-dropdown-sub li.active > a,
.sp-megamenu-parent .sp-dropdown-sub li.current > a{
  background:#564326 !important;
  color:#fff !important;
  font-weight:600;
}

/* ===== FIX DEFINITIF : Helix2 décale le LI parent -> on le fige ===== */
/* 1) Le <li> parent ne doit jamais bouger */
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child,
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child:hover,
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child.open,
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child.active,
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child.show,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child:hover,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child.open,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child.active,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child.show{
  padding-left: 0 !important;
  margin-left: 0 !important;
  transform: none !important;
}

/* 2) On ré-applique l'indentation uniquement au libellé */
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child > .sp-menu-heading,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child > .sp-menu-heading{
  display: block !important;
  padding: 12px 16px !important;
  padding-left: 20px !important;  /* ton alignement */
  margin: 0 !important;
  transform: none !important;
}

/* 3) Même indentation en hover/open/active */
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child:hover > .sp-menu-heading,
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child.open > .sp-menu-heading,
.sp-megamenu-parent .sp-dropdown-items > li.sp-menu-item.sp-has-child.active > .sp-menu-heading,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child:hover > .sp-menu-heading,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child.open > .sp-menu-heading,
.sp-megamenu-parent .sp-dropdown-sub .sp-dropdown-items > li.sp-menu-item.sp-has-child.active > .sp-menu-heading{
  padding-left: 20px !important;
}
