/* ============================================================
   ADNPROG – ANTI CAFARD
   Direction : protection premium, éditoriale et maîtrisée
   Palette : rouge / anthracite / vert profond / ivoire
   ============================================================ */

:root {
  --ac-ink: #171a1f;
  --ac-ink-soft: #2a2f36;
  --ac-red: #d71920;
  --ac-red-dark: #b31118;
  --ac-green: #13795b;
  --ac-green-soft: #dff3eb;
  --ac-ivory: #f7f3ec;
  --ac-surface: #fffdf9;
  --ac-muted: #66707d;
  --ac-line: rgba(23, 26, 31, 0.10);
  --ac-line-strong: rgba(23, 26, 31, 0.18);
  --ac-shadow: 0 22px 48px rgba(26, 28, 35, 0.08);
  --ac-shadow-lg: 0 34px 70px rgba(26, 28, 35, 0.12);
  --ac-radius: 10px;
  --ac-radius-lg: 20px;
  --ac-radius-xl: 32px;
  --ac-section-space: clamp(4.2rem, 7vw, 7rem);
  --adn-p1: var(--ac-red);
  --adn-p2: var(--ac-ink);
  --adn-p3: var(--ac-green);
  --adn-p1-rgb: 215, 25, 32;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top right, rgba(19, 121, 91, 0.07), transparent 26%),
    linear-gradient(180deg, #fbf8f3 0%, #f5efe6 100%);
  color: var(--ac-ink-soft);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.bloc-section-title,
.bloc-global-title {
  color: var(--ac-ink);
  font-family: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-weight: 800;
}

h1,
.hero-title {
  font-size: clamp(2.5rem, 5vw, 5rem);
}

h2,
.bloc-section-title,
.bloc-global-title {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

h3 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

p,
li,
.entry-content p,
.page-content p {
  color: var(--ac-muted);
  font-size: 1.03rem;
}

p {
  max-width: 70ch;
}

strong {
  color: var(--ac-ink);
}

a {
  color: var(--ac-red);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--ac-red-dark);
}

.btn,
button,
input[type="submit"],
.wp-element-button {
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
.wp-element-button:hover {
  transform: translateY(-1px);
}

/* Header utilitaire */
.header-top {
  background: linear-gradient(90deg, #171a1f 0%, #232831 100%) !important;
  color: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-top a {
  color: rgba(255,255,255,0.88);
}

.header-top a:hover {
  color: #ffffff;
}

/* Hero / breadcrumb */
.breadcrumb-nav {
  background: transparent;
  padding-top: 1rem;
}

.breadcrumb-nav .breadcrumb,
.breadcrumb-nav a,
.breadcrumb-nav li,
.breadcrumb-nav span {
  color: rgba(23, 26, 31, 0.68);
}

.page-hero-overlay {
  position: relative;
  overflow: hidden;
  min-height: clamp(430px, 70vh, 760px);
  background:
    radial-gradient(circle at 78% 18%, rgba(215, 25, 32, 0.12), transparent 20%),
    radial-gradient(circle at 82% 72%, rgba(19, 121, 91, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(255,255,255,0.94) 0%, rgba(247,243,236,0.98) 56%, rgba(239,232,220,0.98) 100%);
  border-bottom: 1px solid rgba(23, 26, 31, 0.08);
}

.page-hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, transparent 54%, rgba(23, 26, 31, 0.96) 54%, rgba(23, 26, 31, 0.96) 100%);
  clip-path: polygon(62% 0, 100% 0, 100% 100%, 76% 100%);
  opacity: 1;
  pointer-events: none;
}

.page-hero-overlay::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: clamp(1rem, 7vw, 7rem);
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 0 0 24px rgba(255,255,255,0.04),
    0 0 0 52px rgba(215, 25, 32, 0.07);
  pointer-events: none;
}

.page-hero-overlay .hero-background {
  opacity: 0;
}

.page-hero-overlay .hero-overlay {
  display: none;
}

.page-hero-overlay .container {
  position: relative;
  z-index: 2;
}

.page-hero-overlay .hero-content {
  width: min(58%, 760px);
  padding: clamp(3rem, 7vw, 7rem) 0;
}

.page-hero-overlay .hero-title {
  color: var(--ac-ink);
  max-width: 11ch;
  text-wrap: balance;
}

.page-hero-overlay .hero-title::after {
  content: "";
  display: block;
  width: 98px;
  height: 6px;
  margin-top: 1.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ac-red) 0%, var(--ac-red) 68%, rgba(19, 121, 91, 0.85) 68%, rgba(19, 121, 91, 0.85) 100%);
}

.page-hero-overlay .hero-excerpt,
.page-hero-overlay .hero-excerpt .lead,
.page-hero-overlay .lead,
.page-hero-overlay p {
  color: #545c68;
  font-size: clamp(1.02rem, 1.45vw, 1.16rem);
  max-width: 58ch;
}

.page-hero + .flexible-content-wrapper {
  margin-top: 0 !important;
}

/* Sections pleine largeur */
.flexible-content-wrapper {
  position: relative;
}

.flexible-content-wrapper > section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: var(--ac-section-space);
  padding-bottom: var(--ac-section-space);
}

.flexible-content-wrapper > section::before,
.flexible-content-wrapper > section::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.flexible-content-wrapper > section > * {
  position: relative;
  z-index: 1;
}

.flexible-content-wrapper > section:nth-child(odd) {
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.72));
}

.flexible-content-wrapper > section:nth-child(even) {
  background:
    linear-gradient(180deg, rgba(19,121,91,0.05), rgba(19,121,91,0.02)),
    linear-gradient(135deg, rgba(255,255,255,0.58) 0%, rgba(247,243,236,0.84) 100%);
}

.flexible-content-wrapper > section:nth-child(odd)::before {
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23,26,31,0.14), transparent);
}

.flexible-content-wrapper > section:nth-child(odd)::after {
  top: 1.75rem;
  right: clamp(1rem, 5vw, 5rem);
  width: 140px;
  height: 140px;
  border: 1px dashed rgba(215, 25, 32, 0.28);
  border-radius: 22px;
  transform: rotate(12deg);
  opacity: 0.55;
}

.flexible-content-wrapper > section:nth-child(even)::before {
  top: -1px;
  left: 0;
  width: 100%;
  height: 54px;
  background: linear-gradient(90deg, rgba(215,25,32,0.12), rgba(19,121,91,0.08), rgba(215,25,32,0.12));
  clip-path: polygon(0 0, 100% 24%, 100% 100%, 0 62%);
  opacity: 0.5;
}

.flexible-content-wrapper > section:nth-child(even)::after {
  left: clamp(-2rem, 2vw, 2rem);
  bottom: 2rem;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(19,121,91,0.12) 0%, rgba(19,121,91,0) 72%);
}

.flexible-content-wrapper > section .container,
.flexible-content-wrapper > section .container-fluid {
  position: relative;
}

.flexible-content-wrapper > section .bloc-section-title,
.flexible-content-wrapper > section .bloc-global-title,
.flexible-content-wrapper > section h2 {
  position: relative;
  margin-bottom: 1rem;
}

.flexible-content-wrapper > section .bloc-section-title::after,
.flexible-content-wrapper > section .bloc-global-title::after,
.flexible-content-wrapper > section h2::after {
  content: "";
  display: block;
  width: 88px;
  height: 5px;
  margin-top: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ac-red) 0 72%, var(--ac-green) 72% 100%);
}

/* Blocs image/texte */
.bloc-text-media .row,
.acf-block-text-media .row {
  align-items: center;
  row-gap: 2rem;
}

.bloc-text-media img,
.acf-block-text-media img {
  border-radius: 24px;
  box-shadow: var(--ac-shadow-lg);
  border: 8px solid rgba(255,255,255,0.84);
}

.bloc-text-media .btn,
.acf-block-text-media .btn,
.flexible-content-wrapper .btn-primary,
.flexible-content-wrapper .btn-dark,
.flexible-content-wrapper .btn-light,
.flexible-content-wrapper a.btn {
  border-radius: 999px;
  padding: 0.88rem 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.flexible-content-wrapper .btn-primary,
.flexible-content-wrapper .btn-light,
.flexible-content-wrapper a.btn:not(.btn-outline):not(.btn-outline-light):not(.btn-outline-dark) {
  background: linear-gradient(135deg, var(--ac-red) 0%, #e52b32 100%) !important;
  border-color: var(--ac-red) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(215, 25, 32, 0.22);
}

.flexible-content-wrapper .btn-primary:hover,
.flexible-content-wrapper .btn-light:hover,
.flexible-content-wrapper a.btn:not(.btn-outline):not(.btn-outline-light):not(.btn-outline-dark):hover {
  background: linear-gradient(135deg, var(--ac-red-dark) 0%, #cf2329 100%) !important;
  box-shadow: 0 20px 38px rgba(215, 25, 32, 0.26);
}

.flexible-content-wrapper .btn-outline,
.flexible-content-wrapper .btn-outline-dark,
.flexible-content-wrapper .btn-dark {
  background: var(--ac-ink) !important;
  border-color: var(--ac-ink) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(23, 26, 31, 0.16);
}

.flexible-content-wrapper .btn-outline:hover,
.flexible-content-wrapper .btn-outline-dark:hover,
.flexible-content-wrapper .btn-dark:hover {
  background: #0e1115 !important;
  border-color: #0e1115 !important;
}

/* Cartes étapes */
.adnprog-block-etapes .list-unstyled,
.bloc-etapes .list-unstyled {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.adnprog-block-etapes .list-unstyled > li,
.bloc-etapes .list-unstyled > li {
  margin: 0;
  width: 100% !important;
  max-width: 100% !important;
  flex: initial !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.adnprog-block-etapes .list-unstyled > li > div,
.bloc-etapes .list-unstyled > li > div {
  position: relative;
  height: 100%;
  min-height: 100%;
  padding: 2rem 1.8rem 1.8rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(23, 26, 31, 0.08);
  border-top: 4px solid var(--ac-red);
  border-radius: 22px;
  box-shadow: var(--ac-shadow);
}

.adnprog-block-etapes .list-unstyled > li:nth-child(even) > div,
.bloc-etapes .list-unstyled > li:nth-child(even) > div {
  border-top-color: var(--ac-green);
}

.adnprog-block-etapes .list-unstyled > li > div::before,
.bloc-etapes .list-unstyled > li > div::before {
  content: "";
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(19, 121, 91, 0.08);
}

.adnprog-block-etapes .list-unstyled > li > div > *:first-child,
.bloc-etapes .list-unstyled > li > div > *:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--ac-red) 0%, #f05358 100%);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(215, 25, 32, 0.18);
}

.adnprog-block-etapes .list-unstyled > li:nth-child(even) > div > *:first-child,
.bloc-etapes .list-unstyled > li:nth-child(even) > div > *:first-child {
  background: linear-gradient(135deg, var(--ac-green) 0%, #3aa47f 100%);
  box-shadow: 0 12px 24px rgba(19, 121, 91, 0.18);
}

.adnprog-block-etapes h4,
.bloc-etapes h4 {
  color: var(--ac-ink);
  margin-bottom: 0.9rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.adnprog-block-etapes p,
.bloc-etapes p,
.adnprog-block-etapes li,
.bloc-etapes li {
  font-size: 1.04rem;
  line-height: 1.75;
  color: #5a6470;
  max-width: none;
}

.adnprog-block-etapes img,
.bloc-etapes img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: #f7f4ef;
  padding: 0.45rem;
}

/* Colonnes / infos */
.acf-block-infos-2-colonnes .row > *,
.acf-block-infos-3-colonnes .row > *,
.acf-block-infos-4-colonnes .row > * {
  margin-bottom: 1.25rem;
}

.acf-block-infos-2-colonnes .card,
.acf-block-infos-3-colonnes .card,
.acf-block-infos-4-colonnes .card,
.flexible-content-wrapper .card {
  border: 1px solid rgba(23, 26, 31, 0.08);
  border-radius: 18px;
  box-shadow: var(--ac-shadow);
}

/* CTA simple */
.acf-block-cta-simple,
.bloc-cta-simple {
  background:
    linear-gradient(135deg, #171a1f 0%, #232831 100%) !important;
  color: #fff;
}

.acf-block-cta-simple::before,
.bloc-cta-simple::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(215,25,32,0.14) 34%, transparent 34%, transparent 68%, rgba(19,121,91,0.14) 68%, transparent 68%),
    radial-gradient(circle at top right, rgba(215,25,32,0.18), transparent 28%);
  opacity: 1;
  pointer-events: none;
}

.acf-block-cta-simple .rounded-3,
.bloc-cta-simple .rounded-3 {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 26px !important;
  box-shadow: none !important;
}

.acf-block-cta-simple h2,
.bloc-cta-simple h2,
.acf-block-cta-simple p,
.bloc-cta-simple p {
  color: #fff;
}

.acf-block-cta-simple p,
.bloc-cta-simple p {
  color: rgba(255,255,255,0.74);
}

/* Carte */
.acf-block-carte-map,
.bloc-carte-map {
  background: linear-gradient(180deg, rgba(19,121,91,0.06), rgba(255,255,255,0.22));
}

.acf-block-carte-map .container,
.bloc-carte-map .container,
.acf-block-carte-map .container-fluid,
.bloc-carte-map .container-fluid {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(23,26,31,0.08);
  background: rgba(255,255,255,0.5);
}

.leaflet-container,
.leaflet-pane,
.flexible-content-wrapper iframe {
  border-radius: 22px;
}

.leaflet-container {
  border: 1px solid rgba(23,26,31,0.10);
  box-shadow: var(--ac-shadow);
  overflow: hidden;
}

/* Footer global via design pour cohérence */
.adn-footer {
  margin-top: 0;
}

/* Cookies */
.cookieadmin_law_container,
.cookieadmin_cookie_modal {
  border-radius: 16px !important;
  border: 1px solid rgba(23, 26, 31, 0.08) !important;
  box-shadow: 0 24px 52px rgba(23,26,31,0.16) !important;
}

.cookieadmin_law_container button,
.cookieadmin_cookie_modal button {
  border-radius: 999px !important;
}

@media (max-width: 1199px) {
  .page-hero-overlay .hero-content {
    width: min(66%, 720px);
  }
}

@media (max-width: 991px) {
  .page-hero-overlay::before,
  .page-hero-overlay::after {
    display: none;
  }

  .page-hero-overlay .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 3.4rem 0 4rem;
  }

  .flexible-content-wrapper > section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .adnprog-block-etapes .list-unstyled,
  .bloc-etapes .list-unstyled {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 1.4rem;
  }
}

@media (max-width: 767px) {
  body {
    background: linear-gradient(180deg, #fbf8f3 0%, #f5efe6 100%);
  }

  .page-hero-overlay {
    min-height: auto;
  }

  .page-hero-overlay .hero-title::after,
  .flexible-content-wrapper > section .bloc-section-title::after,
  .flexible-content-wrapper > section .bloc-global-title::after,
  .flexible-content-wrapper > section h2::after {
    width: 68px;
  }

  .adnprog-block-etapes .list-unstyled,
  .bloc-etapes .list-unstyled {
    grid-template-columns: 1fr;
  }

  .flexible-content-wrapper .btn,
  .flexible-content-wrapper a.btn {
    width: 100%;
    justify-content: center;
  }
}
