/* Front Page Styles - Modern Professional Design */

:root {
  /* Modern Color Palette */
  /* Remplacer le bleu par un bleu marine (navy) global */
  --primary: #0B1E3D;           /* bleu marine principal */
  --primary-dark: #071427;      /* bleu marine plus sombre */
  --primary-light: #15324a;     /* ton plus clair de bleu marine */
  --secondary: #64748b;         /* Modern gray */
  --accent: #f59e0b;            /* Warm amber */
  --surface: #ffffff;           /* Pure white */
  --background: #f8fafc;        /* Light gray background */
  --text-primary: #1e293b;      /* Dark slate */
  --text-secondary: #64748b;    /* Medium gray */
  --border: #e2e8f0;            /* Light border */
  --shadow: rgba(0, 0, 0, 0.1); /* Subtle shadow */

  /* Legacy colors for compatibility */
  --cma-border: var(--border);
  --cma-marine: var(--text-primary);
  --abfc-primary: var(--primary);
  --abfc-primary-2: var(--primary-dark);

  /* Layout */
  --side-nav-w: clamp(220px, 26vw, 320px);
  --side-nav-gap: 8px;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 var(--shadow);
  --shadow-md: 0 4px 6px -1px var(--shadow);
  --shadow-lg: 0 10px 15px -3px var(--shadow);
  --shadow-xl: 0 20px 25px -5px var(--shadow);

  /* Premium UI tokens */
  --surface-card: rgba(255, 255, 255, 0.92);
  --surface-card-solid: #ffffff;
  --text-strong: #0f172a;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-card-hover: 0 26px 70px rgba(15, 23, 42, 0.20);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.10);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 280ms;
  --section-gap: clamp(26px, 4vw, 40px);
}

/* Layout général */
body {
  background: var(--background);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
}

body.home,
body.home .site,
body.home .site-content,
body.home .page-wrap,
body.home .site-main,
body.home .content-area,
body.home .entry,
body.home .entry-content,
body.home #page,
body.home #content {
  background: #ffffff !important;
  background-image: none !important;
}
body.home {
  background: #ffffff !important;
  background-image: url("../img/Fond1.jpg") !important;
  background-position: center top !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}
body.home .site,
body.home .site-content,
body.home .page-wrap,
body.home .site-main,
body.home .content-area,
body.home .entry,
body.home .entry-content,
body.home #page,
body.home #content {
  background-color: #ffffff !important;
  background-image: url("../img/Fond1.jpg") !important;
  background-position: center top !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: transparent;
  min-height: 100vh;
  box-shadow: none;
}

/* Surface system */
.surface {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}
.surface:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.page-band {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.title--cma.site-logo {
  margin: 10px 0 8px;
  line-height: 0;
  text-align: center;
}

.title--cma.site-logo img {
  max-width: 100%;
  width: 240px;
}

/* Bannière visuelle modernisée */
.abfc-top-visual {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 60vh;
  min-height: 400px;
  max-height: 600px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background-position: var(--hero-pos, center 25%);
  filter: saturate(.9) brightness(1.03) contrast(.95);
  box-shadow: inset 0 -28px 60px rgba(10, 22, 40, 0.08);
}

.abfc-top-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(186, 216, 255, 0.18) 0%,
    rgba(255, 210, 227, 0.16) 100%
  );
  z-index: 1;
}

.abfc-top-visual::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 55%,
    rgba(255, 255, 255, 0.7) 100%
  );
  z-index: 2;
}

@supports (-webkit-mask-image: linear-gradient(#000, transparent)) or (mask-image: linear-gradient(#000, transparent)) {
  .abfc-top-visual {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
  }
  .abfc-top-visual::after {
    content: none;
  }
}

.abfc-top-visual span.screen-reader-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 90%;
  box-sizing: border-box;
}

/* Responsive pour la bannière */
@media (max-width: 768px) {
  .abfc-top-visual {
    height: 50vh;
    min-height: 300px;
    max-height: 400px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
  }

  .abfc-top-visual span.screen-reader-text {
    font-size: 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .abfc-top-visual {
    height: 40vh;
    min-height: 250px;
  }

  .abfc-top-visual span.screen-reader-text {
    font-size: 0.875rem;
    padding: 1rem;
  }
}

/* HERO central */
.abfc-hero {
  margin: -2rem 0 var(--section-gap);
  position: relative;
  overflow: visible;
}
.abfc-hero::before{
  content:"";
  position:absolute;
  left:50%;
  top:60%;
  width:min(760px, 90vw);
  height:240px;
  transform:translateX(-50%);
  background:radial-gradient(ellipse at center, rgba(255, 220, 235, 0.35) 0%, rgba(186, 216, 255, 0.18) 45%, rgba(255,255,255,0) 70%);
  filter: blur(8px);
  opacity: .6;
  pointer-events:none;
  z-index:0;
}

.abfc-hero__inner {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 2rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  position: relative;
  z-index: 1;
}

.abfc-hero__title {
  margin: 0 0 1rem;
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.08;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.abfc-hero__subtitle {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  font-weight: 400;
  color: #e2e8f0;
  max-width: 700px;
  line-height: 1.45;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  opacity: 0.95;
}

.abfc-hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Override premium hero card on home (replace red band) */
body.home .abfc-hero{
  margin: -1.5rem 0 3rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.home .abfc-hero__inner{
  max-width: 860px;
  background: linear-gradient(180deg, #2b394d 0%, #1f2a3b 100%);
  border: 0;
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.4rem;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
  color: #f8fafc;
}
body.home .abfc-hero__title{
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}
body.home .abfc-hero__subtitle{
  color: #e2e8f0;
}
body.home .abfc-hero__ctas .cta-pill{
  background: #ffffff;
  color: #0B1E3D;
  border: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out), filter var(--motion-fast) var(--ease-out);
}
body.home .abfc-hero__ctas .cta-pill:hover{
  background: #f1f5f9;
  color: #0B1E3D;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}
body.home .abfc-hero__ctas .cta-pill--myspace{
  background: #ffffff;
  color: #0B1E3D;
  border: 0;
  box-shadow: var(--shadow-soft);
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out), filter var(--motion-fast) var(--ease-out);
}
body.home .abfc-hero__ctas .cta-pill--myspace:hover{
  background: #f1f5f9;
  color: #0B1E3D;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

/* Section rhythm */
.abfc-about,
.abfc-resources,
.cma-layout > .slab,
.offers-grid,
.cta-row,
.links {
  margin-top: var(--section-gap);
}

/* Premium hover for cards */
.of-card{
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}
.of-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

/* Sidebar micro-interactions */
.abfc-side-nav__link{
  transition: transform var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .surface,
  .of-card,
  .cta-pill,
  .abfc-side-nav__link{
    transform: none !important;
  }
}

/* Responsive adjustments: make hero more compact on small screens */
@media (max-width: 760px) {
  .abfc-hero__inner {
    padding: 1.25rem 1rem !important;
    min-height: 180px !important;
  }
  .abfc-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
    margin-bottom: 0.6rem !important;
    line-height: 1.05 !important;
  }
  .abfc-hero__subtitle {
    font-size: .95rem !important;
    margin-bottom: 0.8rem !important;
    max-width: 90% !important;
  }
  .abfc-hero__ctas { gap: .5rem; }
}

.cta-pill,
.pill,
.button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  height: 72px;
  padding: 0 3rem;
  border-radius: 36px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  min-width: 280px;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
}

.cta-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.cta-pill:hover::before {
  left: 100%;
}

.cta-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  color: #ffffff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cta-pill:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
  color: #ffffff;
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.3),
    0 0 32px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.cta-pill:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.1s ease;
}

.cta-pill--myspace {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow:
    0 8px 32px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-pill--myspace:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 16px 48px rgba(102, 126, 234, 0.4),
    0 0 32px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta-pill--myspace:active {
  transform: translateY(-2px) scale(0.98);
  background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
}

/* Sections génériques */
.grid {
  display: grid;
}

.slab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slab:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.section-title {
  margin: 0 0 1.5rem;
  color: var(--text-primary);
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.muted {
  color: var(--text-secondary);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, #f8fafc 100%);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.linkbtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(11, 30, 61, 0.08), transparent);
  transition: left 0.5s ease;
}

.linkbtn:hover::before {
  left: 100%;
}

.linkbtn:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.sr-only {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* ===== MENU LATÉRAL GAUCHE (hors container principal) ===== */
.abfc-side-nav {
  position: fixed;
  left: var(--side-nav-gap);
  bottom: 1rem;
  top: auto;

  width: var(--side-nav-w);
  height: auto;
  max-height: calc(100vh - 3rem);

  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  box-shadow: var(--shadow-xl);
  color: #f1f5f9;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.abfc-side-nav__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #f9fafb !important;
  margin: 0 0 4px;
}

.abfc-side-nav__logo {
  font-size: 16px;
  font-weight: 800;
  color: #f9fafb !important;
  margin-bottom: 4px;
}

.abfc-side-nav__group {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(248, 250, 252, .35);
}

.abfc-side-nav__group:first-of-type {
  border-top: none;
  padding-top: 0;
}

.abfc-side-nav__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #f9fafb !important;
  margin: 0 0 4px;
}

.abfc-side-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.abfc-side-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #f9fafb !important; /* Blanc pur pour contraste */
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
}

.abfc-side-nav__link span.emoji {
  width: 12px;
  text-align: center;
}

.abfc-side-nav__link:hover,
.abfc-side-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: #f9fafb !important; /* Blanc pur maintenu */
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  outline: none;
}

.abfc-side-nav__link--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 4px 15px rgba(11, 30, 61, 0.12);
}

.abfc-side-nav__link--primary:hover,
.abfc-side-nav__link--primary:focus-visible {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(11, 30, 61, 0.16);
}

@media (max-width: 1199px) {
  .abfc-side-nav {
    display: none;
  }
  .abfc-mobile-login {
    display: block;
  }
}

@media (min-width: 1200px) {
  .abfc-mobile-login {
    display: none;
  }
}

.abfc-mobile-login {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
}

.abfc-mobile-login__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.abfc-mobile-login__btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.abfc-mobile-login__btn:hover::before {
  left: 100%;
}

.abfc-mobile-login__btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.abfc-mobile-login__panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 220;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.abfc-mobile-login__panel.is-open {
  transform: translateY(0);
}

.abfc-mobile-login__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 800;
}

.abfc-mobile-login__close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* Décaler le contenu pour laisser la place au menu à gauche sur grand écran */
@media (min-width: 1200px) {
  .page-wrap {
    padding-left: calc(18px + var(--side-nav-w) + var(--side-nav-gap));
  }
}

/* on enlève le marqueur par défaut du <summary> */
.panel-acc__summary::-webkit-details-marker {
  display: none;
}

.panel-acc {
  background: rgba(15, 23, 42, .22);
  border: 1px solid rgba(15, 23, 42, .4);
  border-radius: 12px;
  margin-top: 8px;
}

/* Ligne "Connexion" = bouton */
.panel-acc__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 13px;
  color: #f9fafb;
}

/* flèche qui pivote quand le bloc est ouvert */
.panel-acc[open] .chev {
  transform: rotate(180deg);
}

/* Bloc de login */
.login-embed {
  background: rgba(15, 23, 42, .4);
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  padding: 8px;
}

.login-embed,
.login-embed label,
.login-embed input,
.login-embed a {
  font-size: 12px;
}

.login-embed button,
.login-embed input[type="submit"] {
  font-size: 12px;
  padding: 4px 10px;
  height: 32px;
  border-radius: 8px;
}

.login-embed .abfc-login-footer {
  margin-top: 6px;
  font-size: 11px;
  text-align: right;
}

.login-embed .abfc-login-footer a {
  color: #f9fafb;
  font-weight: 600;
  text-decoration: underline;
}

/* Table offres */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cartes "dernières offres" : design moderne */
.offer-flip {
  height: 320px;
  perspective: 1000px;
}

.offer-flip__inner {
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.offer-flip:hover .offer-flip__inner {
  transform: rotateY(180deg);
}

.offer-flip__face {
  height: 100%;
  position: absolute;
  width: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.offer-flip__front {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.flip-skill {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  padding: 1rem;
}

.offer-flip__back {
  transform: rotateY(180deg);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}

.of-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  font-size: 0.9rem;
}

.of-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.of-card__title a {
  color: inherit;
  text-decoration: none;
}

.of-card__title a:hover {
  color: var(--primary);
}

.of-card__excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.of-card__foot {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.of-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  min-width: 160px;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
}

.of-btn--primary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  color: #ffffff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.of-btn--primary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
  color: #ffffff;
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.3),
    0 0 32px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.of-btn--primary:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.1s ease;
}

.of-link-filter {
  color: var(--primary);
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 500;
}

.of-link-filter:hover {
  text-decoration: underline;
}

/* Boutons table */
.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* On home page, make the two hero CTA pills turn white on hover (text becomes dark) */
.home .cta-row .cta-pill:hover,
.home .cta-row .cta-pill:focus {
  background: #ffffff !important;
  color: var(--brand-secondary, #0B1E3D) !important;
  border-color: #e6e8ee !important;
}

.cta-row .cta-pill {
  min-width: 200px;
  height: 60px;
  padding: 0 2rem;
  font-size: 1.1rem;
  border-radius: 30px;
}

/* MAP BFC */
#bfc-osm-map .map-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}

#bfc-svg-host svg,
#bfc-inline-fallback svg {
  display: block;
  width: 100%;
  height: auto;
}

#bfc-svg-host [id^="dep-"] {
  cursor: pointer;
  outline: none;
}

#bfc-svg-host g[id^="dep-"] path,
#bfc-svg-host g[id^="dep-"] polygon {
  fill: #c22027 !important;
  stroke: #ffffff !important;
  stroke-width: 12 !important;
  opacity: 1 !important;
  vector-effect: non-scaling-stroke;
  transition: filter .15s ease;
}

#bfc-svg-host g[id^="dep-"]:hover path,
#bfc-svg-host g[id^="dep-"]:focus path,
#bfc-svg-host g[id^="dep-"]:hover polygon,
#bfc-svg-host g[id^="dep-"]:focus polygon {
  filter: brightness(0.92);
}

#bfc-svg-host text.dep-label {
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, Arial;
  font-weight: 700;
  font-size: 4px;
  line-height: 1.1;
  fill: #0a1a35;
  stroke: #ffffff;
  stroke-width: 2px;
  paint-order: stroke;
  stroke-linejoin: round;
  letter-spacing: .1px;
  text-anchor: middle;
  pointer-events: none;
  opacity: .98;
}

@media (max-width: 900px) {
  #bfc-svg-host text.dep-label {
    font-size: 6px;
    stroke-width: 1.8px;
  }
}

@media (max-width: 600px) {
  #bfc-svg-host text.dep-label {
    font-size: 5px;
    stroke-width: 1.5px;
  }
}

#bfc-svg-host line.dep-leader {
  stroke: #0b1e3d;
  stroke-width: 2.2px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

#bfc-svg-host line.dep-leader.bg {
  stroke: #ffffff;
  stroke-width: 5px;
}

@media (max-width: 600px) {
  #bfc-svg-host text.dep-label[data-code="90"] {
    transform: translate(15px, -20px);
  }
}

.abfc-logout-floating {
  position: fixed;
  right: 104px;
  bottom: 24px;
  z-index: 100;
}

.abfc-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .25);
}

.abfc-logout-btn:hover {
  background: #111827;
  color: #ffffff;
}

/* === FIX visibilité champs dans le panneau Connexion mobile === */
.abfc-mobile-login__panel .login-embed {
  background: transparent;
  border: 0;
  padding: 0;
}

.abfc-mobile-login__panel .login-embed label {
  color: #f9fafb !important;
  font-weight: 700;
  display: block;
  margin: 0 0 6px;
}

.abfc-mobile-login__panel .login-embed,
.abfc-mobile-login__panel .login-embed p,
.abfc-mobile-login__panel .login-embed a,
.abfc-mobile-login__panel .login-embed span {
  color: #e5e7eb !important;
}

.abfc-mobile-login__panel .login-embed input[type="text"],
.abfc-mobile-login__panel .login-embed input[type="email"],
.abfc-mobile-login__panel .login-embed input[type="password"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
}

.abfc-mobile-login__panel .login-embed input::placeholder {
  color: #64748b !important;
  opacity: 1;
}

.abfc-mobile-login__panel .login-embed .abfc-login-footer a {
  color: #ffffff !important;
  text-decoration: underline;
}

/* ===== Side nav responsive (améliore l'adaptation petits écrans) ===== */
.abfc-side-nav {
  width: var(--side-nav-w);
  max-width: calc(100vw - (2 * var(--side-nav-gap)) - 12px); /* évite tout overflow */
  padding: clamp(6px, 1vw, 10px) clamp(8px, 1.2vw, 12px);
  border-radius: clamp(14px, 1.2vw, 18px);
  gap: clamp(6px, .8vw, 8px);
  max-height: calc(100vh - 24px);
}

/* Textes/espacements qui "rétrécissent" progressivement */
.abfc-side-nav__logo {
  font-size: clamp(14px, 1.2vw, 16px);
}

.abfc-side-nav__title {
  font-size: clamp(11px, .9vw, 12px);
}

.abfc-side-nav__label {
  font-size: clamp(9px, .75vw, 10px);
}

.abfc-side-nav__link {
  font-size: clamp(11px, .9vw, 12px);
  padding: clamp(6px, .8vw, 8px) clamp(8px, 1vw, 10px);
  border-radius: clamp(10px, 1vw, 12px);
}

/* Le contenu principal garde exactement "la bonne place" en fonction de la largeur réelle du menu */
@media (min-width: 1200px) {
  .page-wrap {
    padding-left: calc(18px + var(--side-nav-w) + var(--side-nav-gap));
  }
}

/* Si la hauteur d'écran est faible : on compacte un peu */
@media (max-height: 720px) {
  .abfc-side-nav {
    bottom: 8px;
    max-height: calc(100vh - 16px);
  }
}
