/* ═══════════════════════════════════════════════════════════════════════════
   FRBTP Guyane - VAGUE 1A - Socle design Direction FRBTP Clair (2026-07-22)
   Header, Footer, Bottom Nav Mobile, Chamfer, Contraste
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Header FRBTP Clair ──────────────────────────────────────────────────── */
.frbtp-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all 0.3s var(--ease);
}

.frbtp-header.scrolled {
  padding: 0.875rem 0;
  box-shadow: 0 2px 12px rgba(22,32,46,0.06);
}

.frbtp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* Logo header */
.frbtp-header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}

.frbtp-header__logo:hover {
  transform: translateY(-1px);
}

.frbtp-logo-img {
  display: block;
  height: 76px;
  width: auto;
  max-width: 340px;
  object-fit: contain;
}

.frbtp-logo-mark {
  flex-shrink: 0;
}

.frbtp-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frbtp-logo-word {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.01em;
  line-height: 1;
}

.frbtp-logo-sub {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

/* Navigation header */
.frbtp-header__nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.frbtp-nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.frbtp-nav-list > li {
  position: relative;
}

.frbtp-nav-list > li > a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
  display: block;
  padding: 0.5rem 0.5rem;
}

.frbtp-nav-list > li > a:hover {
  color: var(--blue);
}

/* Sous-menus */
.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 0.375rem;
  vertical-align: middle;
  transition: transform 0.2s var(--ease);
}

.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  padding: 0.75rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s var(--ease);
  z-index: 100;
  list-style: none;
  margin: 0;
}

.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li {
  margin: 0;
}

.sub-menu a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.15s var(--ease);
}

.sub-menu a:hover {
  background: var(--bg-2);
  color: var(--blue);
  padding-left: 1.5rem;
}

/* CTA navigation (orange - dynamisme, Leçon accent visible)
   VAGUE 4 (2026-07-23) : le chamfer coupait le coin HAUT-GAUCHE, seul CTA
   du site à ne pas suivre la règle transverse "coin haut-droit coupé"
   (TOKENS.md "Bordure vivante") - corrigé pour matcher .frbtp-chamfer /
   .frbtp-card / tous les autres boutons. position:relative + isolation
   nécessaires pour la trace au survol branchée depuis main.css.
   Sélecteur qualifié par .frbtp-header__nav (au lieu de .frbtp-btn-cta-nav
   seul) : une règle legacy "fallback" dans main.css (.frbtp-header__nav a /
   .frbtp-header__nav a:hover, ancien header pré-VAGUE-1A jamais nettoyé)
   a une spécificité plus forte et écrasait silencieusement la couleur de
   texte (ink au lieu de blanc) et le fond au survol (bleu pâle au lieu
   d'orange foncé) - trouvé en QA visuelle réelle, pas en relisant le code. */
.frbtp-header__nav .frbtp-btn-cta-nav {
  position: relative;
  isolation: isolate;
  background: var(--orange-fill);
  color: #fff;
  padding: 0.7rem 1.1rem;
  clip-path: polygon(0 0, calc(100% - var(--chamfer-cta)) 0, 100% var(--chamfer-cta), 100% 100%, 0 100%);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  display: inline-block;
}

.frbtp-header__nav .frbtp-btn-cta-nav--whatsapp {
  /* Chaine WhatsApp (Lucas 2026-07-23) : vert, memes bordures chamfer.
     Vert charte --green #0D7A38 (AA sur blanc), pas le vert clair #25D366
     (contraste insuffisant en fond de bouton). */
  background: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.frbtp-header__nav .frbtp-btn-cta-nav--whatsapp:hover {
  background: var(--accent-green-dark);
  color: #fff;
}

.frbtp-header__nav .frbtp-btn-cta-nav:hover {
  background: var(--orange-text);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(181,84,10,0.35);
}

/* Toggle mobile */
.frbtp-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.frbtp-header__toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s var(--ease);
  display: block;
}

/* ── Footer FRBTP Clair (bleu profond #033475) ──────────────────────────── */
.frbtp-footer {
  padding: 5rem 0 2.5rem;
  background: var(--blue-deep);
  color: white;
}

.frbtp-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.frbtp-footer__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.frbtp-footer__logo .frbtp-logo-img {
  /* VAGUE 4 (2026-07-23) : logo footer trop petit signalé par Lucas,
     agrandi de 40px à 68px (proportion cohérente avec le logo header 76px,
     sans écraser la grille footer - testé desktop + mobile). */
  /* Fichier recadre (sans le vide du PNG source) : 72px de marque REELLE,
     nettement plus grande que les 68px du carre plein de vide d'avant. */
  height: 72px;
  max-width: 300px;
}

.frbtp-footer__logo .frbtp-logo-word {
  color: white;
}

.frbtp-footer__logo .frbtp-logo-sub {
  color: rgba(255,255,255,0.7);
}

.frbtp-footer__tagline {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

.frbtp-footer__address {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
}

.frbtp-footer__links h4 {
  font-size: 1.0625rem;
  margin-bottom: 1.25rem;
  color: white;
  font-weight: 600;
}

.frbtp-footer__links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.frbtp-footer__links li {
  margin-bottom: 0.75rem;
}

.frbtp-footer__links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s var(--ease);
}

.frbtp-footer__links a:hover {
  color: white;
}

.frbtp-footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.frbtp-footer__social a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
  color: white;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.frbtp-footer__social a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.frbtp-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  flex-wrap: wrap;
  gap: 1rem;
}

.frbtp-footer__credit a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
  transition: color 0.2s var(--ease);
}

.frbtp-footer__credit a:hover {
  color: white;
}

/* ── Bottom Nav Mobile (3 boutons + collision FAB) ──────────────────────── */
.frbtp-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 0.5rem 0;
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: var(--z-sticky);
  box-shadow: 0 -2px 12px rgba(22,32,46,0.06);
}

.frbtp-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease);
  flex: 1;
  max-width: 120px;
}

.frbtp-bottom-nav__item:hover,
.frbtp-bottom-nav__item.active {
  color: var(--blue);
}

.frbtp-bottom-nav__item svg {
  flex-shrink: 0;
}

.frbtp-bottom-nav__cta {
  color: var(--orange);
}

.frbtp-bottom-nav__cta:hover {
  color: var(--orange-fill);
}

/* Bottom sheet menu */
.frbtp-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: flex-end;
}

.frbtp-bottom-sheet.open {
  display: flex;
}

.frbtp-bottom-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(22,32,46,0.6);
  cursor: pointer;
}

.frbtp-bottom-sheet__content {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-height: 70vh;
  clip-path: polygon(0 0, calc(100% - var(--chamfer-card)) 0, 100% var(--chamfer-card), 100% 100%, 0 100%);
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
}

.frbtp-bottom-sheet.open .frbtp-bottom-sheet__content {
  transform: translateY(0);
}

.frbtp-bottom-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.frbtp-bottom-sheet__header h2 {
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0;
}

.frbtp-bottom-sheet__close {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.frbtp-bottom-sheet__close:hover {
  color: var(--ink);
}

.frbtp-bottom-sheet__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.frbtp-bottom-sheet__menu li {
  margin-bottom: 0.5rem;
}

.frbtp-bottom-sheet__menu a {
  display: block;
  padding: 1rem;
  background: var(--bg-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 500;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  border-left: 3px solid var(--orange);
  transition: all 0.2s var(--ease);
}

.frbtp-bottom-sheet__menu a:hover {
  background: var(--bg-blue-tint);
  transform: translateX(4px);
}

/* ── Collision FAB WhatsApp + Bandeau cookies (offset) ──────────────────── */
/* FAB WhatsApp décalé de la bottom nav */
.whatsapp-fab,
#whatsapp-fab {
  bottom: calc(56px + 1rem) !important; /* hauteur bottom nav + marge */
  transition: bottom 0.3s var(--ease) !important;
}

/* Bandeau cookies poussé au-dessus de la bottom nav */
.cookie-notice,
#cookie-notice,
.cookie-banner {
  bottom: 56px !important; /* hauteur bottom nav */
  position: fixed !important;
  width: 100% !important;
  z-index: calc(var(--z-sticky) - 1) !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  /* Navigation cachée sur tablette/mobile */
  .frbtp-header__nav {
    display: none;
  }

  .frbtp-header__toggle {
    display: flex;
  }

  /* Bottom nav visible */
  .frbtp-bottom-nav {
    display: flex;
  }

  /* Footer en colonne simple */
  .frbtp-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 767px) {
  .frbtp-header {
    padding: 1rem 0;
  }

  .frbtp-logo-word {
    font-size: 1.5rem;
  }

  .frbtp-logo-sub {
    font-size: 0.5625rem;
  }

  .frbtp-footer__logo .frbtp-logo-img {
    height: 52px;
    max-width: 200px;
  }

  .frbtp-bottom-nav__item {
    font-size: 0.6875rem;
    padding: 0.375rem 0.5rem;
  }
}

/* ── Chamfer global (cartes, boutons) ────────────────────────────────────── */
.frbtp-card,
.card,
.post-card,
.membre-card,
.entreprise-card,
.offre-card,
.annonce-card {
  position: relative;
  isolation: isolate;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  border-left: 3px solid var(--orange);
  box-shadow: var(--shadow-card);
  transition: all 0.3s var(--ease);
}

.frbtp-card:hover,
.card:hover,
.post-card:hover,
.membre-card:hover,
.entreprise-card:hover,
.offre-card:hover,
.annonce-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Badges secteur orange (G1 contraste) */
.badge-secteur,
.frbtp-badge--secteur {
  background: var(--orange) !important;
  color: #1B1205 !important; /* Encre sur orange : 8.15:1 AAA */
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%);
  display: inline-block;
}

/* Badge contrat OK (garder) */
.badge-contrat,
.frbtp-badge--contrat {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%);
  display: inline-block;
}

/* ══ Agenda home (R5 - 2026-07-23) ═══════════════════════════════════════════ */
.frbtp-agenda-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.frbtp-agenda-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--chamfer-card)) 0, 100% var(--chamfer-card), 100% 100%, 0 100%);
  padding: var(--space-5);
}
.frbtp-agenda-card__date {
  flex-shrink: 0;
  width: 62px;
  text-align: center;
  background: var(--blue);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--chamfer-sm)) 0, 100% var(--chamfer-sm), 100% 100%, 0 100%);
  padding: 0.45rem 0.25rem 0.4rem;
}
.frbtp-agenda-card__jour {
  display: block;
  font-family: var(--font-numbers);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}
.frbtp-agenda-card__mois {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.frbtp-agenda-card__title { font-size: var(--font-size-md); margin: 0 0 0.2rem; line-height: 1.3; }
.frbtp-agenda-card__title a { color: var(--ink); text-decoration: none; }
.frbtp-agenda-card__title a:hover { color: var(--blue); }
.frbtp-agenda-card__meta { margin: 0; font-size: var(--font-size-sm); color: var(--muted); }
@media (max-width: 991px) { .frbtp-agenda-grid { grid-template-columns: 1fr; } }

/* ══ Le mot du President - encart flottant sticky (R4 - 2026-07-23) ══════════ */
.frbtp-president-sticky {
  position: fixed;
  right: 0;
  top: 45%;
  transform: translateY(-50%);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--blue-deep);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 0.9rem 0.65rem 0.65rem;
  clip-path: polygon(0 0, calc(100% - var(--chamfer-cta)) 0, 100% var(--chamfer-cta), 100% 100%, 0 100%);
  border-left: 3px solid var(--orange);
  transition: transform 0.25s var(--ease), background 0.2s var(--ease);
}
.frbtp-president-sticky:hover {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  transform: translateY(-50%) translateX(-4px);
}
.frbtp-president-sticky img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.frbtp-president-sticky__label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
@media (max-width: 1023px) {
  .frbtp-president-sticky { display: none; }
}

/* ══ Nos partenaires (R7 - 2026-07-23) ═══════════════════════════════════════ */
.frbtp-partenaires-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-blue-tint);
  border: 1px solid var(--blue-tint-line);
  clip-path: polygon(0 0, calc(100% - var(--chamfer-sm)) 0, 100% var(--chamfer-sm), 100% 100%, 0 100%);
  color: var(--blue-deep);
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: 0.7rem 1rem;
  margin-bottom: var(--space-8);
}
.frbtp-partenaires-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.frbtp-partenaire-tile {
  position: relative;
  isolation: isolate;
  background: var(--bg);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--chamfer-card)) 0, 100% var(--chamfer-card), 100% 100%, 0 100%);
  min-height: 190px;
  cursor: help;
  outline: none;
}
.frbtp-partenaire-tile__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  min-height: 190px;
  text-align: center;
}
.frbtp-partenaire-tile__logo img {
  max-height: 84px;
  width: auto;
  max-width: 80%;
  object-fit: contain;
}
.frbtp-partenaire-tile__initiale {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-blue-tint);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-numbers);
  font-size: 1.6rem;
  font-weight: 800;
}
.frbtp-partenaire-tile__name {
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: var(--ink);
}
.frbtp-partenaire-tile__role {
  position: absolute;
  inset: 0;
  background: var(--blue-deep);
  color: #fff;
  clip-path: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: var(--space-5);
  text-align: left;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.frbtp-partenaire-tile__role strong { font-size: var(--font-size-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.frbtp-partenaire-tile__role p { margin: 0; font-size: var(--font-size-sm); line-height: 1.5; color: rgba(255,255,255,.92); }
.frbtp-partenaire-tile:hover .frbtp-partenaire-tile__role,
.frbtp-partenaire-tile:focus .frbtp-partenaire-tile__role,
.frbtp-partenaire-tile:focus-within .frbtp-partenaire-tile__role {
  opacity: 1;
}
@media (max-width: 1199px) { .frbtp-partenaires-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .frbtp-partenaires-grid { grid-template-columns: 1fr; }
  /* mobile : pas de survol -> le role est toujours visible sous le logo */
  .frbtp-partenaire-tile { min-height: 0; }
  .frbtp-partenaire-tile__logo { min-height: 0; padding-bottom: var(--space-3); }
  .frbtp-partenaire-tile__role {
    position: static;
    opacity: 1;
    clip-path: none;
    background: var(--bg-blue-tint);
    color: var(--ink);
    padding-top: var(--space-3);
  }
  .frbtp-partenaire-tile__role strong { color: var(--blue-deep); }
  .frbtp-partenaire-tile__role p { color: var(--muted); }
}
