/*
 * LAYOUT.CSS — Header, Footer, Navigation, Mobile sticky
 * Camier Avocat — dépend de charte.css
 */

/* ════════════════════════════
   HEADER
════════════════════════════ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  height: 68px;
  transition: background .35s, backdrop-filter .35s, box-shadow .35s;
}

#site-header .hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 52px;
}

/* État scrolled — fond marine semi-transparent */
#site-header.scrolled {
  background: rgba(26, 31, 46, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
}

/* Header toujours marine plein, accueil compris : sur la photo du hero, le menu
   transparent devenait illisible (Contact, Articles, téléphone). */
#site-header {
  background: rgba(26, 31, 46, 1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
}

/* ── Logo ── */
.hdr-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logo WP custom (the_custom_logo) */
.hdr-logo .custom-logo-link {
  display: flex;
  align-items: center;
}
.hdr-logo .custom-logo {
  height: 46px;
  width: auto;
}

/* Logo SVG par défaut (svg/camier-avocat-negatif.svg) */
.logo-svg-link { display: flex; align-items: center; }
.logo-svg { height: 46px; width: auto; display: block; }

/* Logo fallback texte */
.logo-fallback {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.logo-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  letter-spacing: .02em;
  line-height: 1.1;
}
.logo-tag {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--y-mid);
}

/* ── Navigation ── */
#main-nav {}

ul.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

ul.nav a {
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  position: relative;
  transition: color .2s;
}
ul.nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1.5px;
  background: var(--y);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s;
}
ul.nav a:hover,
ul.nav li.current-menu-item > a {
  color: #fff;
}
ul.nav a:hover::after,
ul.nav li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* ── Actions header ── */
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Burger ── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 11px; /* zone tactile ≥ 44 × 44 px */
  min-width: 44px; min-height: 44px;
  justify-content: center; align-items: center;
  background: transparent;
  border: none;
}
.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #fff;
  transition: transform .3s, opacity .3s;
}
.burger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.hdr-tel, .hdr-rdv { white-space: nowrap; }

/* Entre 1181 et 1320 px : menu resserré, téléphone en icône seule */
@media (max-width: 1320px) {
  #site-header .hdr-inner { padding: 0 32px; }
  ul.nav { gap: 24px; }
  .hdr-tel { padding: 9px 11px; }
  .hdr-tel span { display: none; }
}

/* ════════════════════════════
   NAVIGATION MOBILE (ouverte)
   Burger dès 1180 px : 7 entrées + 2 boutons
   ne tiennent pas sur une ligne en dessous
════════════════════════════ */
@media (max-width: 1180px) {
  #site-header .hdr-inner {
    padding: 0 24px;
  }

  .burger { display: flex; }

  ul.nav {
    display: none; /* caché par défaut, ouvert par JS */
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: rgba(26, 31, 46, .97);
    backdrop-filter: blur(14px);
    padding: 28px 32px;
    gap: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    z-index: calc(var(--z-header) - 1);
  }
  ul.nav.nav-open { display: flex; max-height: calc(100vh - 68px); overflow-y: auto; }
  ul.nav { gap: 2px; }
  ul.nav a { font-size: 14px; display: block; padding: 11px 0; }
}

@media (max-width: 860px) {
  .hdr-tel { display: none; }
}

/* ════════════════════════════
   EN-TÊTE MOBILE
   Sous 860 px, le bouton de rendez-vous de l'en-tête laisse la place
   à la barre d'actions du bas d'écran (même action, à portée de pouce) :
   l'en-tête ne garde que le logo et le menu.
════════════════════════════ */
@media (max-width: 860px) {
  .hdr-rdv { display: none; }
}

/* ════════════════════════════
   FOOTER
   (repasse UX du 02/11/2026 : coordonnées en tête, liens sur deux
   colonnes sur mobile, plus de doublon, espacements resserrés)
════════════════════════════ */
.footer {
  background: var(--ink);
  padding: 56px 0 28px;
  color: rgba(255, 255, 255, .7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 8px;
}

.f-brand-n {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 4px;
}
.f-brand-r {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--y);
  margin: 0 0 14px;
}
.f-desc {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, .66);
  line-height: 1.65;
  max-width: 300px;
  margin: 0 0 10px;
}

/* Coordonnées : chaque ligne est une cible de 44 px */
.f-coords { list-style: none; margin: 0; padding: 0; }
.f-coord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  color: rgba(255, 255, 255, .82);
  transition: color .2s;
}
.f-coord svg { flex-shrink: 0; color: var(--y); }
a.f-coord:hover { color: #fff; }
.f-coord--tel { font-weight: 500; color: #fff; }
.f-coord--txt { color: rgba(255, 255, 255, .7); }
@media (min-width: 1101px) { .f-coord { min-height: 34px; } } /* souris : lignes plus serrées */

.f-col-h {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  margin: 0 0 6px;
}
.f-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
}
.f-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, .74);
  transition: color .2s;
}
.f-links a:hover { color: #fff; }
.f-links-all a { color: var(--y); font-weight: 400; }
.f-links-all a:hover { color: var(--y-mid); }

.footer-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
}
.footer-copy { margin: 0; order: -1; }
.footer-leg {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.footer-leg a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, .66);
  transition: color .2s;
}
.footer-leg a:hover { color: #fff; }

/* ════════════════════════════
   BARRE D'ACTIONS MOBILE
   (affichée sous 860 px ; main.js la masque quand un autre appel
   à l'action est à l'écran, pendant la saisie et sous le bandeau cookies)
════════════════════════════ */
.mob-sticky {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: var(--z-sticky);
  background: var(--ink-soft);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  transition: transform .25s ease, visibility .25s;
}
.mob-sticky.is-hidden { transform: translateY(110%); visibility: hidden; }

.mob-sticky-call,
.mob-sticky-rdv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  white-space: nowrap;
  transition: background .2s;
}
.mob-sticky-call {
  flex: 0 0 auto;
  min-width: 112px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 500;
}
.mob-sticky-call:hover { background: rgba(255, 255, 255, .1); }
.mob-sticky-rdv {
  flex: 1 1 auto;
  background: var(--y);
  color: var(--ink);
  font-weight: 600;
}
.mob-sticky-rdv:hover { background: var(--y-deep); }

/* ════════════════════════════
   BANDEAU COOKIES
════════════════════════════ */
.rgpd-bandeau {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: var(--z-overlay);
  background: var(--ink);
  border-top: 2px solid var(--y);
  padding: 16px 40px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
}
.rgpd-bandeau[hidden] { display: none; }
.rgpd-texte {
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
  max-width: 680px;
  margin: 0;
  line-height: 1.55;
}
.rgpd-texte a { color: var(--y); text-decoration: underline; text-underline-offset: 2px; }
.rgpd-btns { display: flex; gap: 10px; flex-shrink: 0; }
.rgpd-btn {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 40px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.rgpd-btn--refus {
  border: 1px solid rgba(255, 255, 255, .45);
  background: transparent;
  color: #fff;
}
.rgpd-btn--refus:hover { border-color: #fff; }
.rgpd-btn--ok {
  border: 1px solid var(--y);
  background: var(--y);
  color: var(--ink);
  font-weight: 600;
}
.rgpd-btn--ok:hover { background: var(--y-deep); border-color: var(--y-deep); }

/* ════════════════════════════
   RESPONSIVE FOOTER, BARRE MOBILE, BANDEAU
════════════════════════════ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 28px 32px; }
  .footer-col--brand { grid-column: 1 / -1; }
  .f-links a { min-height: 44px; } /* écrans tactiles */
}

@media (max-width: 860px) {
  .mob-sticky { display: flex; }
  /* Sans JavaScript, la barre reste affichée : réserver sa place sous le pied de page */
  html:not(.sticky-auto) body:not(.is-contact) .footer { padding-bottom: 96px; }
  .rgpd-bandeau { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 600px) {
  .footer { padding: 40px 0 16px; }
  .f-desc { display: none; } /* redit l'accroche du site ; les coordonnées passent avant */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 20px; }
  /* Liens sur deux colonnes : moitié moins de hauteur, rien de masqué */
  .f-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .f-links a { min-height: 44px; }
  .footer-bot { flex-direction: column; align-items: flex-start; }
  .footer-copy { order: 1; padding: 8px 0 4px; font-size: 12px; }
  .rgpd-bandeau { gap: 12px; }
  .rgpd-btns { width: 100%; }
  .rgpd-btn { flex: 1; }
}

/* ════════════════════════════
   BARRE D'ADMINISTRATION WORDPRESS
   (utilisateurs connectés uniquement) : WordPress décale la page
   de 32 px (46 px sous 783 px) ; le header fixe se place dessous.
════════════════════════════ */
.admin-bar #site-header { top: 32px; }
@media screen and (max-width: 1180px) {
  .admin-bar ul.nav { top: calc(68px + 32px); max-height: calc(100vh - 100px); }
}
@media screen and (max-width: 782px) {
  .admin-bar #site-header { top: 46px; }
  .admin-bar ul.nav { top: calc(68px + 46px); max-height: calc(100vh - 114px); }
}
