/* ==========================================================================
   Methodologie page — architecture diagram and the "Fondements" tab
   switcher. Tabs/panels are wired by js/method-modal.js via the shared
   [data-method-modal]/[data-method-tab]/[data-method-panel] attributes
   (same script used by the homepage's Structogénie modal) — this file only
   owns the look of the tab pills and the panel type.
   Container/header/eyebrow/title come from css/components/section.css.
   Blocks: .methodologie__diagram, .methodologie__caption,
           .methodologie__fondements, .methodologie__tabs, .methodologie__tab,
           .methodologie__panels, .methodologie__panel, .methodologie__tools,
           .methodologie__tools-block, .methodologie__lexique-list
   ========================================================================== */

.methodologie__diagram {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
}

.methodologie__cta {
  display: flex;
  justify-content: center;
}

/* .section--centered's flex gap (var(--space-7)) puts a full 48px above and
   below every child by default — pull the divider in on both sides so it
   reads as tied to the CTA and the text around it instead of floating in a
   generic gap. */
.methodologie__demarche-divider {
  width: 100%;
  height: 1px;
  margin-top: calc(var(--space-5) - var(--space-7));
  margin-bottom: calc(var(--space-5) - var(--space-7));
  border: none;
  background: var(--glass-border-strong);
}

.methodologie__caption {
  width: 100%;
  margin-inline: auto;
  text-align: center;
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.methodologie__fondements {
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  padding: var(--space-7);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.methodologie__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

/* Glass look comes from .glass/.glass--pill/.glass--light (see glass.css,
   applied directly on the button in the markup) — this only owns type,
   spacing, and the active/hover treatment on top of it. */
.methodologie__tab {
  flex: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.methodologie__tab:hover {
  border-color: rgba(227, 0, 27, 0.4);
  color: var(--color-red);
}

/* Two classes beat the single-class .glass/.glass--light rules regardless
   of stylesheet order (same trick as .glass--card.glass--featured-red in
   glass.css), so the active pill can drop the frosted look for a solid
   brand-red fill instead. */
.methodologie__tab.is-active {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
  box-shadow: 0 6px 16px rgba(227, 0, 27, 0.3);
}

.methodologie__panels {
  margin-top: var(--space-6);
}

.methodologie__panel {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
}

.methodologie__panel.is-active {
  display: flex;
}

.methodologie__block-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.methodologie__block-text {
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.methodologie__block-text strong {
  color: var(--color-text-primary);
}

.methodologie__highlight {
  font-size: var(--fs-md);
  font-weight: 700;
  font-style: italic;
  color: var(--color-red-dark);
}

/* Extra info under the "Voir notre méthodologie" CTA — still part of "La
   démarche", not a new section, so it just continues the flow instead of
   getting its own .section__header. */
.methodologie__tools {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-2);
}

.methodologie__tools-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.methodologie__subtitle {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-text-primary);
}

.methodologie__lexique-list {
  list-style: disc;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.methodologie__lexique-list li {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.methodologie__lexique-list li strong {
  color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .methodologie__fondements {
    padding: var(--space-5);
  }

  .methodologie__tab {
    flex: 1 1 auto;
  }
}
