/*
 * ANS Domaine des urgences pour Twenty Twenty-Four.
 * Objectif : garder l'éditeur de site complet et rapprocher l'UI du site esante.gouv.fr.
 */

:root {
  --ans-blue: #1d71b8;
  --ans-blue-dark: #155891;
  --ans-navy: #343852;
  --ans-text: #697097;
  --ans-light: #f6f8fb;
  --ans-border: #dee0ea;
  --ans-pink: #d4005a;
  --ans-card: #717b9f;
  --ans-radius: 2.2rem;
  --ans-shadow: 0 1.8rem 4rem rgba(52, 56, 82, .12);
}

html { scroll-behavior: smooth; }
body {
  background: #fff;
  color: var(--ans-text);
  font-family: futura-pt, Marianne, Arial, sans-serif;
}

body .wp-site-blocks { min-height: 100vh; }
a { text-underline-offset: .24em; }
.wp-block-navigation a,
.wp-block-navigation-item__content { text-decoration: none !important; }

/* Header proche esante.gouv.fr */
.ans-site-header {
  background: #fff;
  box-shadow: 0 .2rem 1.4rem rgba(52, 56, 82, .08);
  position: relative;
  z-index: 100;
}

.ans-topbar {
  background: var(--ans-navy);
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  min-height: 36px;
  text-transform: uppercase;
}
.ans-topbar > .wp-block-group { min-height: 36px; }
.ans-topbar .wp-block-navigation,
.ans-topbar .wp-block-navigation__container { gap: 0 !important; }
.ans-topbar .wp-block-navigation-item__content {
  color: #fff !important;
  padding: .78rem 1rem;
}
.ans-topbar .wp-block-navigation-item__content:hover,
.ans-topbar .wp-block-navigation-item__content:focus { background: rgba(255,255,255,.08); }
.ans-topbar .ans-top-active > .wp-block-navigation-item__content,
.ans-topbar .current-menu-item > .wp-block-navigation-item__content {
  background: var(--ans-blue);
  color: #fff !important;
}

.ans-main-header {
  background: #fff;
  min-height: 86px;
}
.ans-main-header > .wp-block-group { min-height: 86px; }
.ans-branding {
  gap: 2rem !important;
  min-width: 0;
}
.ans-branding .wp-block-image { margin: 0; }
.ans-branding img { display: block; height: auto; width: auto; }
.ans-ministere img { max-height: 62px; }
.ans-logo img { max-height: 54px; }
.ans-site-title-wrap {
  border-left: 1px solid var(--ans-border);
  min-width: 12rem;
  padding-left: 1.6rem;
}
.ans-site-title-wrap .wp-block-site-title,
.ans-site-title-wrap .wp-block-site-title a {
  color: var(--ans-navy) !important;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

.ans-main-nav .wp-block-navigation__container { gap: clamp(1rem, 2vw, 2.1rem) !important; }
.ans-main-nav .wp-block-navigation-item__content {
  border-bottom: 3px solid transparent;
  color: var(--ans-navy) !important;
  font-size: .98rem;
  font-weight: 650;
  padding: 1.3rem 0 1rem;
}
.ans-main-nav .wp-block-navigation-item__content:hover,
.ans-main-nav .wp-block-navigation-item__content:focus,
.ans-main-nav .current-menu-item > .wp-block-navigation-item__content,
.ans-main-nav .ans-main-active > .wp-block-navigation-item__content {
  border-bottom-color: var(--ans-blue);
  color: var(--ans-blue) !important;
}
.ans-header-icons {
  color: var(--ans-navy);
  font-size: 1.45rem;
  gap: .8rem !important;
  white-space: nowrap;
}

/* Contenu */
main { min-height: 45vh; }
.ans-content-shell {
  padding-top: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(4rem, 6vw, 7rem);
}
.wp-block-post-title,
.ans-title {
  color: var(--ans-navy);
  font-weight: 800;
  letter-spacing: -.02em;
}

/* Hero réutilisable proche Domaine des urgences */
.ans-du-hero {
  background: #fff;
  overflow: hidden;
  position: relative;
}
.ans-du-hero::before {
  background:
    radial-gradient(circle at 0% 0%, rgba(237,238,243,.95) 0 35%, transparent 36%),
    radial-gradient(circle at 58% 42%, rgba(237,238,243,.95) 0 20%, transparent 21%),
    radial-gradient(circle at 23% 72%, rgba(237,238,243,.95) 0 25%, transparent 26%);
  content: "";
  inset: 0 auto 0 0;
  opacity: .78;
  pointer-events: none;
  position: absolute;
  width: min(34vw, 520px);
}
.ans-du-hero > * { position: relative; z-index: 1; }
.ans-breadcrumb {
  color: var(--ans-text);
  font-size: .92rem;
  margin-bottom: clamp(2rem, 5vw, 5rem);
}
.ans-breadcrumb a { color: #65709b; }
.ans-breadcrumb strong { color: var(--ans-blue); }
.ans-du-hero h1 {
  color: var(--ans-navy);
  font-size: clamp(2.4rem, 4.2vw, 4.1rem);
  line-height: 1.05;
  margin-bottom: 1.3rem;
}
.ans-du-hero p {
  color: #55608a;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}
.ans-du-hero-image { position: relative; }
.ans-du-hero-image img {
  aspect-ratio: 1.45/1;
  clip-path: ellipse(72% 74% at 62% 21%);
  object-fit: cover;
  width: 100%;
}
.ans-du-hero-image::before,
.ans-du-hero-image::after {
  border-radius: 42% 58% 50% 50%;
  content: "";
  position: absolute;
  z-index: 2;
}
.ans-du-hero-image::before {
  background: var(--ans-blue);
  height: clamp(4.8rem, 7vw, 7.2rem);
  left: -1rem;
  top: 22%;
  width: clamp(4.8rem, 7vw, 7.2rem);
}
.ans-du-hero-image::after {
  background: var(--ans-pink);
  bottom: 9%;
  height: clamp(7rem, 10vw, 10rem);
  right: 15%;
  width: clamp(7rem, 10vw, 10rem);
}

/* Blocs / cartes */
.ans-section-title {
  color: var(--ans-navy);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}
.ans-product-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.ans-product-card {
  background: var(--ans-card);
  border-radius: var(--ans-radius);
  box-shadow: var(--ans-shadow);
  color: #fff;
  min-height: 15.5rem;
  padding: 2.2rem 1.8rem;
  text-align: center;
}
.ans-product-card h3,
.ans-product-card h2,
.ans-product-card p,
.ans-product-card a { color: #fff !important; }
.ans-product-card h3 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-top: 0;
}
.ans-product-card ul {
  display: inline-block;
  margin: .5rem auto 0;
  padding-left: 1.1rem;
  text-align: left;
}
.ans-product-card li::marker { color: var(--ans-blue); }

.wp-block-button__link,
.llms-button-primary,
.llms-button-action,
.llms-button-secondary,
.llms-button {
  border-radius: 999px !important;
  font-weight: 800 !important;
  padding: .95rem 1.55rem !important;
}
.wp-block-button__link,
.llms-button-primary,
.llms-button-action {
  background: var(--ans-blue) !important;
  border: 2px solid var(--ans-blue) !important;
  color: #fff !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  border-color: var(--ans-blue) !important;
  color: var(--ans-blue) !important;
}

/* Footer proche ANS, 100% bloc et modifiable */
.ans-footer {
  background: #fff;
  border-top: 1px solid var(--ans-border);
  color: #58618a;
  position: relative;
}
.ans-partners {
  background: #fff;
  padding: clamp(2.2rem, 5vw, 4rem) 1rem;
  text-align: center;
}
.ans-partners h2 { color: var(--ans-navy); margin-bottom: 2rem; }
.ans-partner-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}
.ans-partner-card {
  align-items: center;
  background: #fff;
  border-radius: 2rem;
  box-shadow: var(--ans-shadow);
  display: flex;
  justify-content: center;
  min-height: 150px;
  padding: 1.5rem;
}
.ans-partner-card img { max-height: 64px; object-fit: contain; width: auto; }
.ans-footer-main {
  border-top: 1px solid var(--ans-border);
  padding: clamp(2.5rem, 5vw, 4rem) 1rem 2rem;
}
.ans-footer-main a { color: #59628a; }
.ans-footer-logos { gap: 1.5rem !important; }
.ans-footer-address {
  color: var(--ans-navy);
  font-weight: 800;
  line-height: 1.45;
}
.ans-footer-links ul,
.ans-footer-bottom ul { list-style: none; margin: 0; padding: 0; }
.ans-footer-links li { margin: .55rem 0; }
.ans-footer-links a::before { content: "› "; color: var(--ans-blue); font-weight: 800; }
.ans-footer-bottom {
  border-top: 1px solid var(--ans-border);
  font-size: .9rem;
  margin-top: 2.5rem;
  padding-top: 1.6rem;
}
.ans-footer-bottom .wp-block-navigation__container { gap: 1.3rem !important; justify-content: center; }
.ans-footer-bottom .wp-block-navigation-item__content { color: #59628a !important; }

.ans-orienteur {
  align-items: center;
  background: var(--ans-blue);
  border-radius: 999px;
  bottom: 2rem;
  box-shadow: 0 .9rem 2rem rgba(52,56,82,.25);
  color: #fff;
  display: flex;
  gap: 1rem;
  max-width: 380px;
  padding: .9rem 1rem .9rem 1.5rem;
  position: fixed;
  right: 2rem;
  z-index: 200;
}
.ans-orienteur p { color: #fff; line-height: 1.2; margin: 0; }
.ans-orienteur span { display: block; font-size: .9rem; }
.ans-orienteur__icon {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--ans-blue) !important;
  display: flex;
  flex: 0 0 54px;
  font-size: 1.7rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

/* LifterLMS */
.llms-course-list .llms-loop-item,
.llms-lesson-preview,
.llms-student-dashboard,
.llms-checkout-wrapper,
.llms-syllabus-wrapper {
  background: #fff;
  border: 1px solid var(--ans-border);
  border-radius: 1.4rem;
  box-shadow: 0 1rem 2.6rem rgba(52,56,82,.08);
}
.llms-course-title,
.llms-lesson-title,
.llms-section-title,
.llms-syllabus-wrapper h3 { color: var(--ans-navy); font-weight: 800; }
.llms-progress-bar { background: #e9ebf2; border-radius: 999px; overflow: hidden; }
.llms-progress-bar-complete { background: var(--ans-blue); }
.llms-notice,
.llms-error,
.llms-message {
  background: #fff;
  border-left: 4px solid var(--ans-blue);
  border-radius: 1rem;
  box-shadow: 0 .8rem 2rem rgba(52,56,82,.08);
  padding: 1rem 1.25rem;
}
.llms-form-field input,
.llms-form-field select,
.llms-form-field textarea {
  border: 1px solid var(--ans-border);
  border-radius: .8rem;
  padding: .85rem 1rem;
}
.llms-form-field input:focus,
.llms-form-field select:focus,
.llms-form-field textarea:focus {
  outline: 2px solid var(--ans-blue);
  outline-offset: 2px;
}

/* Éditeur : réduire les surprises visuelles */
.editor-styles-wrapper .ans-site-header,
.editor-styles-wrapper .ans-footer { box-shadow: none; }
.editor-styles-wrapper .ans-orienteur { position: static; margin: 1rem auto; }

@media (max-width: 1100px) {
  .ans-main-header > .wp-block-group { align-items: flex-start !important; flex-direction: column; }
  .ans-main-nav .wp-block-navigation__container { gap: 1rem !important; }
}
@media (max-width: 760px) {
  .ans-topbar > .wp-block-group { align-items: flex-start !important; flex-direction: column; }
  .ans-branding { align-items: flex-start !important; flex-direction: column; gap: 1rem !important; }
  .ans-site-title-wrap { border-left: 0; padding-left: 0; }
  .ans-du-hero::before { width: 100%; }
  .ans-du-hero-image::before { left: .5rem; }
  .ans-orienteur { bottom: 1rem; left: 1rem; right: 1rem; max-width: none; }
}
