/* ============================================================
   AMBIZ — Page Template Service
   Hero impactant + breadcrumb + grille 2 col (contenu + sidebar
   sticky) + CTA final fond navy.
   Réutilisé par : hubs (Formations langues, Tests, Entreprises,
   Traduction) et sous-pages (Cours d'anglais, TOEFL, etc.)
   ============================================================ */


/* ════════════════════════════════════════════════════════════
   1. BREADCRUMB
   Le composant est désormais dans components.css (chargé sur tous
   les gabarits). Ne restent ici que les surcharges contextuelles
   du hero image, plus bas dans « 2. HERO SERVICE ».
   ════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════
   2. HERO SERVICE
   ════════════════════════════════════════════════════════════ */

.ambiz-service__hero {
  position: relative;
  background: var(--ambiz-bg-light);
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-bottom: 1px solid var(--ambiz-border-light);
  overflow: hidden;
  isolation: isolate;
}

.ambiz-service__hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at top right, rgba(200, 16, 46, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(27, 42, 78, 0.04) 0%, transparent 50%);
}

/* Variant with featured image — dark overlay for text legibility */
.ambiz-service__hero--has-image {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  border-bottom: none;
}

.ambiz-service__hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.ambiz-service__hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(15, 31, 61, 0.55) 0%, rgba(15, 31, 61, 0.85) 100%),
    linear-gradient(90deg, rgba(15, 31, 61, 0.4) 0%, transparent 100%);
}

.ambiz-service__hero--has-image .ambiz-service__title,
.ambiz-service__hero--has-image .ambiz-service__subtitle {
  color: #FFFFFF;
}

.ambiz-service__hero--has-image .ambiz-service__subtitle {
  color: rgba(255, 255, 255, 0.92);
}

.ambiz-service__hero--has-image .ambiz-breadcrumb__list,
.ambiz-service__hero--has-image .ambiz-breadcrumb__list a,
.ambiz-service__hero--has-image .ambiz-breadcrumb__sep {
  color: rgba(255, 255, 255, 0.85);
}

.ambiz-service__hero--has-image .ambiz-breadcrumb__list a:hover {
  color: #FFFFFF;
}

.ambiz-service__hero--has-image .is-current span {
  color: #FFFFFF;
}

.ambiz-service__hero-inner {
  max-width: 880px;
}

.ambiz-service__title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 5.5vw, var(--text-6xl));
  font-weight: var(--font-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ambiz-navy);
  margin: 0 0 var(--space-md);
  text-wrap: balance;
}

.ambiz-service__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  line-height: var(--leading-relaxed);
  color: var(--ambiz-text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 720px;
}

.ambiz-service__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.ambiz-service__hero .ambiz-btn--primary {
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.25);
}

@media (max-width: 768px) {
  .ambiz-service__hero {
    padding: var(--space-xl) 0 var(--space-2xl);
  }
  .ambiz-service__hero-actions .ambiz-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}


/* ════════════════════════════════════════════════════════════
   3. CORPS — Grille 2 colonnes (contenu + sidebar sticky)
   ════════════════════════════════════════════════════════════ */

.ambiz-service__body {
  background: var(--ambiz-bg);
  padding: var(--space-3xl) 0;
}

.ambiz-service__body-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 1023px) {
  .ambiz-service__body-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}


/* ════════════════════════════════════════════════════════════
   4. CONTENU (Gutenberg riche)
   ════════════════════════════════════════════════════════════ */

.ambiz-service__content {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--ambiz-text);
  min-width: 0;
}

.ambiz-service__content > * + * {
  margin-top: var(--space-md);
}

.ambiz-service__content h2 {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  color: var(--ambiz-navy);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  letter-spacing: var(--tracking-tight);
}

.ambiz-service__content h3 {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
  font-weight: var(--font-bold);
  color: var(--ambiz-navy);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-2xs);
}

.ambiz-service__content p {
  margin: 0;
}

.ambiz-service__content strong {
  font-weight: var(--font-semibold);
  color: var(--ambiz-navy);
}

.ambiz-service__content a {
  color: var(--ambiz-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-out);
}

.ambiz-service__content a:hover {
  color: var(--ambiz-red-dark);
  text-decoration-thickness: 2px;
}

.ambiz-service__content ul,
.ambiz-service__content ol {
  padding-left: var(--space-md);
  margin: 0;
}

.ambiz-service__content li {
  margin: var(--space-2xs) 0;
  line-height: var(--leading-relaxed);
}

.ambiz-service__content ul li::marker {
  color: var(--ambiz-red);
}

.ambiz-service__content blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--ambiz-bg-light);
  border-left: 4px solid var(--ambiz-red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.ambiz-service__content img {
  border-radius: var(--radius-lg);
  margin: var(--space-md) 0;
}

/* Columns block Gutenberg → styling pour les cards sub-pages */
.ambiz-service__content .wp-block-columns {
  margin: var(--space-lg) 0;
  gap: var(--space-md);
}

.ambiz-service__content .wp-block-column {
  background: var(--ambiz-bg-light);
  border: 1px solid var(--ambiz-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  transition: transform var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.ambiz-service__content .wp-block-column:hover {
  transform: translateY(-3px);
  border-color: var(--ambiz-navy);
  box-shadow: 0 12px 24px rgba(15, 31, 61, 0.08);
}

.ambiz-service__content .wp-block-column h3,
.ambiz-service__content .wp-block-column h4 {
  margin-top: 0;
  font-size: var(--text-lg);
}

.ambiz-service__content .wp-block-column p {
  font-size: var(--text-sm);
  color: var(--ambiz-text-muted);
  margin-top: var(--space-2xs);
}


/* ════════════════════════════════════════════════════════════
   5. SIDEBAR STICKY (encart contact)
   ════════════════════════════════════════════════════════════ */

.ambiz-service__sidebar {
  min-width: 0;
}

.ambiz-service__sticky-card {
  position: sticky;
  top: var(--space-lg);
  background: linear-gradient(135deg, var(--ambiz-navy) 0%, var(--ambiz-navy-dark) 100%);
  color: var(--ambiz-text-inverse);
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 32px rgba(15, 31, 61, 0.15);
}

.ambiz-service__sticky-card .ambiz-eyebrow {
  color: var(--ambiz-red-light);
}

.ambiz-service__sticky-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  color: var(--ambiz-text-inverse);
  margin: var(--space-2xs) 0 var(--space-md);
}

.ambiz-service__usp-list {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.ambiz-service__usp-list li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.9);
}

.ambiz-service__usp-list li::marker {
  content: none;
}

.ambiz-service__usp-list svg {
  width: 18px;
  height: 18px;
  color: var(--ambiz-red-light);
  flex-shrink: 0;
}

.ambiz-service__sticky-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.ambiz-service__sticky-contact {
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ambiz-service__sticky-contact-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 var(--space-2xs);
}

.ambiz-service__sticky-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ambiz-text-inverse) !important;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.ambiz-service__sticky-contact-link:hover {
  color: var(--ambiz-red-light) !important;
}

.ambiz-service__sticky-contact-link svg {
  width: 14px;
  height: 14px;
  color: var(--ambiz-red-light);
}

@media (max-width: 1023px) {
  .ambiz-service__sticky-card {
    position: static;
  }
}


/* ════════════════════════════════════════════════════════════
   6. CTA FINAL fond navy
   ════════════════════════════════════════════════════════════ */

.ambiz-service__cta-final {
  position: relative;
  background: var(--ambiz-navy-dark);
  color: var(--ambiz-text-inverse);
  padding: var(--space-3xl) 0;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.ambiz-service__cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 0%, rgba(200, 16, 46, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, var(--ambiz-navy-dark) 0%, var(--ambiz-navy-darker) 100%);
}

.ambiz-service__cta-inner {
  max-width: 640px;
}

.ambiz-service__cta-title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--ambiz-text-inverse);
  margin: 0 0 var(--space-sm);
}

.ambiz-service__cta-subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 var(--space-lg);
}

.ambiz-service__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.ambiz-service__cta-final .ambiz-btn--primary .ambiz-btn__icon {
  transition: transform var(--duration-base) var(--ease-out);
}

.ambiz-service__cta-final .ambiz-btn--primary:hover .ambiz-btn__icon {
  transform: translateX(3px);
}

@media (max-width: 540px) {
  .ambiz-service__cta-actions .ambiz-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}


/* ════════════════════════════════════════════════════════════
   7. RTL
   ════════════════════════════════════════════════════════════ */

[dir="rtl"] .ambiz-service__content blockquote {
  border-left: none;
  border-right: 4px solid var(--ambiz-red);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

[dir="rtl"] .ambiz-service__content ul,
[dir="rtl"] .ambiz-service__content ol {
  padding-left: 0;
  padding-right: var(--space-md);
}

[dir="rtl"] .ambiz-service__hero .ambiz-btn__icon,
[dir="rtl"] .ambiz-service__cta-final .ambiz-btn__icon {
  transform: scaleX(-1);
}

[dir="rtl"] .ambiz-service__cta-final .ambiz-btn--primary:hover .ambiz-btn__icon {
  transform: scaleX(-1) translateX(3px);
}


/* ════════════════════════════════════════════════════════════
   8. PRÉFÉRENCES UTILISATEUR
   ════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .ambiz-service__content .wp-block-column,
  .ambiz-service__cta-final .ambiz-btn__icon {
    transition: none;
    transform: none !important;
  }
}


/* ============================================================
   ÉQUIPE — grille membres (page « Notre équipe »)
   ============================================================ */

.ambiz-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0 var(--space-xl);
}

.ambiz-team__card {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md);
  background: var(--ambiz-paper, #fff);
  border: 1px solid var(--ambiz-border-light, #e6e6e6);
  border-radius: var(--radius-lg, 16px);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.ambiz-team__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 31, 61, 0.1);
}

.ambiz-team__photo {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--ambiz-bg-blue-tint, #eaf0f7);
  margin-bottom: var(--space-sm);
}

.ambiz-team__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ambiz-team__name {
  font-family: var(--font-serif);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  color: var(--ambiz-navy);
}

.ambiz-team__role {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--ambiz-red);
  font-weight: var(--font-semibold);
}

[dir="rtl"] .ambiz-team__card {
  text-align: center;
}


/* ============================================================
   GALERIE LOCAUX (page « Nos locaux »)
   ============================================================ */

.ambiz-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-lg) 0 var(--space-xl);
}

.ambiz-gallery__img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--ambiz-border-light, #e6e6e6);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.ambiz-gallery__img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(15, 31, 61, 0.14);
}

@media (max-width: 600px) {
  .ambiz-gallery__img {
    height: 200px;
  }
}

/* ============================================================
   Maillage interne — bloc « Pages liées » (silo SEO)
   ============================================================ */
.ambiz-related {
  padding: var(--space-3xl) 0;
  background: var(--ambiz-bg-light);
  border-top: 1px solid var(--ambiz-border-light);
}

.ambiz-related__title {
  font-size: var(--text-2xl);
  color: var(--ambiz-navy);
  margin: var(--space-2xs) 0 var(--space-xl);
}

.ambiz-related__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.ambiz-related__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: #fff;
  border: 1px solid var(--ambiz-border-light);
  border-radius: var(--radius-md);
  color: var(--ambiz-navy);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, color 0.2s;
}

.ambiz-related__link::after {
  content: "\2192"; /* fleche droite */
  color: var(--ambiz-red);
  transition: transform 0.2s;
}

.ambiz-related__link:hover {
  border-color: var(--ambiz-red);
  color: var(--ambiz-red);
  box-shadow: 0 8px 24px rgba(15, 31, 61, 0.1);
  transform: translateY(-2px);
}

.ambiz-related__link:hover::after {
  transform: translateX(4px);
}

.ambiz-related__item--hub .ambiz-related__link {
  background: var(--ambiz-navy);
  border-color: var(--ambiz-navy);
  color: var(--ambiz-text-inverse);
}

.ambiz-related__item--hub .ambiz-related__link::after {
  content: "\2197"; /* fleche diagonale */
  color: var(--ambiz-red-light);
}

.ambiz-related__item--hub .ambiz-related__link:hover {
  background: var(--ambiz-navy-dark);
  border-color: var(--ambiz-navy-dark);
  color: #fff;
}

/* ============================================================
   FAQ — accordéon natif <details> (+ schema FAQPage)
   ============================================================ */
.ambiz-faq {
  padding: var(--space-3xl) 0;
}

.ambiz-faq__inner {
  max-width: 820px;
}

.ambiz-faq__title {
  font-size: var(--text-2xl);
  color: var(--ambiz-navy);
  margin: var(--space-2xs) 0 var(--space-xl);
}

.ambiz-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ambiz-faq__item {
  border: 1px solid var(--ambiz-border-light);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.ambiz-faq__item[open] {
  border-color: var(--ambiz-navy);
}

.ambiz-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  color: var(--ambiz-navy);
  cursor: pointer;
  list-style: none;
}

.ambiz-faq__question::-webkit-details-marker {
  display: none;
}

.ambiz-faq__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--ambiz-red);
  transition: transform 0.25s ease;
}

.ambiz-faq__item[open] .ambiz-faq__chevron {
  transform: rotate(180deg);
}

.ambiz-faq__answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--ambiz-text-muted);
  line-height: 1.6;
}

.ambiz-faq__answer p {
  margin: 0;
}

/* Liens transversaux (autres rubriques) : contour rouge discret pour les
   distinguer visuellement des pages de la même rubrique. */
.ambiz-related__item--cross .ambiz-related__link {
  background: var(--ambiz-red-tint);
  border-color: var(--ambiz-red-tint);
}

.ambiz-related__item--cross .ambiz-related__link:hover {
  background: #fff;
  border-color: var(--ambiz-red);
}

/* ============================================================
   Maillage interne — « À lire aussi sur le blog »
   Ouvre un chemin page de service -> contenu informationnel.
   ============================================================ */
.ambiz-readalso {
  padding: var(--space-3xl) 0;
  background: #fff;
  border-top: 1px solid var(--ambiz-border-light);
}

.ambiz-readalso__title {
  font-size: var(--text-2xl);
  color: var(--ambiz-navy);
  margin: var(--space-2xs) 0 var(--space-xl);
}

.ambiz-readalso__grid {
  list-style: none;
  margin: 0 0 var(--space-lg);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.ambiz-readalso__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  height: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--ambiz-bg-light);
  border: 1px solid var(--ambiz-border-light);
  border-left: 3px solid var(--ambiz-red);
  border-radius: var(--radius-md);
  color: var(--ambiz-navy);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

.ambiz-readalso__link:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 31, 61, 0.1);
  transform: translateY(-2px);
}

.ambiz-readalso__label {
  font-weight: 600;
  line-height: 1.35;
}

.ambiz-readalso__date {
  font-size: var(--text-sm);
  color: var(--ambiz-text-muted);
}

.ambiz-readalso__all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--ambiz-red);
  font-weight: 600;
  text-decoration: none;
}

.ambiz-readalso__all::after {
  content: "\2192";
  transition: transform 0.2s;
}

.ambiz-readalso__all:hover::after {
  transform: translateX(4px);
}
