/* ============================================================
   DOMAINES — Stylesheet
   Follows layout.css tokens: --container-max-width, --color-light-green
   ============================================================ */

/* ---------- Heading banner ---------- */
.domaines-hero {
  background-image: url(../images/bg.svg);
  background-size: cover;
}

.heading {
  width: 100%;
  max-width: var(--container-max-width);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 40px;
}

.heading-content {
  max-width: 760px;
}

.heading-content .section-header {
  margin-bottom: 1rem;
}

.prestations-page .header-label div {
  background-color: var(--color-blue-main);
}

.prestations-page .header-label span {
  color: var(--color-gray);
}

.heading-content h1 {
  color: #fff;
  font-family: var(--font-secondary);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-h1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.heading-content h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 64px;
  height: 3px;
  background: var(--color-blue-main);
}

.heading-content p.lead {
  color: #fff;
  font-size: var(--font-size-lead);
  font-weight: 600;
  max-width: 640px;
  line-height: 1.7;
}


/* ---------- Section wrapper ---------- */
.section-container {
    width: 100%;
    padding: 40px 32px;
    max-width: var(--container-max-width);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ---------- Domain card ---------- */
.domain-container {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 36px 32px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;

    /* Scroll-animation initial state */
    opacity: 0;
    transform: translateY(36px);
}

.domain-container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.domain-container:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

/* When card is animating in, disable the hover lift so they don't conflict */
.domain-container:not(.is-visible):hover {
    transform: translateY(36px);
}

.domain-container.normal  { flex-direction: row; }
.domain-container.reverse { flex-direction: row-reverse; }

/* ---------- Left column: image + title ---------- */
.domain-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 28%;
    flex-shrink: 0;
}

.domain-image {
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-light-green, #e8f5e9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.domain-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.domain-text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.domain-subtitle {
    font-size: 0.875rem;
    color: var(--color-blue-dark);
    line-height: 1.6;
    margin: 0;
    padding: 10px 14px;
    background: var(--color-blue-soft);
    border-radius: 8px;
    border-left: 4px solid currentColor;
    border-left-color: var(--color-blue-dark);
}


/* ---------- Right column: services + button ---------- */
.domain-references {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 20px;
    padding: 4px 0 4px 32px;
    border-left: 1px solid rgba(0, 0, 0, 0.07);
}

.domain-container.reverse .domain-references {
    padding: 4px 32px 4px 0;
    border-left: none;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
}

/* ---------- Services list ---------- */
.domain-services {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.domain-services li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.domain-services li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    min-width: 7px;
    border-radius: 50%;
    background: #2e7d32;
    margin-top: 7px;
}

.domain-services li:hover {
    border: 1px solid #17823d;
}

/* ---------- Références button ---------- */
.btn-references {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-blue-dark);
    background: var(--color-blue-pale);
    border: 1.5px solid rgba(46, 125, 50, 0.3);
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-references::after {
    content: '→';
    transition: transform 0.2s ease;
}

.btn-references:hover {
    background: var(--color-blue-dark);
    color: #fff;
    border-color: var(--color-blue-dark);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.25);
    transform: translateY(-1px);
}

.btn-references:hover::after {
    transform: translateX(4px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .domain-info { width: 35%; }
}

@media (max-width: 700px) {
    .section-container {
        padding: 24px 16px;
        gap: 20px;
    }

    .heading {
        padding: 40px 20px 32px;
    }

    .domain-container,
    .domain-container.normal,
    .domain-container.reverse {
        flex-direction: column;
        padding: 24px 20px;
        gap: 24px;
    }

    .domain-info {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    .domain-text{
        display: none;
    }
    .domain-image {
        display: none;
    }

    .domain-references,
    .domain-container.reverse .domain-references {
        padding: 0;
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        padding-top: 20px;
    }

    .domain-services li {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}