﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f6f5f1;
    --bg-alt: #ece9e1;
    --card: #ffffff;
    --text: #2d312d;
    --text-soft: #5b635b;
    --heading: #243125;
    --line: #d8d8cf;
    --accent: #506b4f;
    --accent-dark: #304430;
    --shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    --radius: 10px;
    --container: 1160px;
}

html {
    scroll-behavior: smooth;
    font-size: 112.5%; /* 1rem = 18px : tout le texte du site grandit d'environ 12 % */
}

body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

img {
    display: block;
    width: 100%;
    height: auto;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(90%, var(--container));
    margin: 0 auto;
}

.section {
    padding: 52px 0;
}

.alt-bg {
    background: var(--bg-alt);
}

.site-header {
    background: #fbfaf7;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: 14px 0 12px;
}

.brand-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-top: 3px;
}

.main-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.main-nav a {
    color: var(--text-soft);
}

.main-nav a:hover {
    color: var(--heading);
    text-decoration: none;
}

.hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 40, 28, 0.42);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    color: #ffffff;
    padding: 42px 0;
}

.hero-content h1 {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1.16;
    margin-bottom: 14px;
    font-weight: 700;
}

.hero-text {
    font-size: 1.1rem;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.94);
}

.section-label {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.section-label.light {
    color: rgba(255, 255, 255, 0.88);
}

h2 {
    font-size: clamp(1.35rem, 2.1vw, 1.8rem);
    line-height: 1.26;
    color: var(--heading);
    margin-bottom: 16px;
    font-weight: 700;
}

h3 {
    font-size: 1.15rem;
    line-height: 1.28;
    color: var(--heading);
    margin-bottom: 8px;
}

p {
    margin-bottom: 11px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 28px;
    align-items: start;
}

.split-layout.reverse {
    grid-template-columns: 1fr 0.95fr;
}

.text-column {
    min-width: 0;
    max-width: 720px;
}

.portrait-card,
.tool-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.portrait-card {
    max-width: 210px;
    justify-self: end;
}

.portrait-card img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    max-height: 260px;
}

.portrait-caption {
    padding: 12px 14px;
    font-size: 0.92rem;
    color: var(--text-soft);
}

.service-grid {
    display: grid;
    gap: 22px;
}

.service-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-card img {
    height: 100%;
    object-fit: cover;
    min-height: 200px;
    max-height: 240px;
}

.service-body {
    padding: 16px 18px 18px 0;
}

.service-subtitle {
    color: var(--text-soft);
    font-style: italic;
    margin-bottom: 10px;
    font-size: 1rem;
}

.service-body ul {
    padding-left: 17px;
    margin-top: 10px;
}

.service-body li {
    margin-bottom: 6px;
}

.section-intro {
    max-width: 760px;
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.gallery-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-item img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.gallery-item figcaption {
    padding: 11px 13px 13px;
    font-size: 0.92rem;
    color: var(--text-soft);
}

.visual-row {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 26px;
    align-items: center;
}

.visual-block img,
.tool-card img {
    border-radius: var(--radius);
}

.button-line {
    margin-top: 14px;
}

.button-link {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    background: #fafbf8;
    font-weight: 600;
    font-size: 1rem;
}

.button-link:hover {
    background: #f0f4ee;
    text-decoration: none;
}

.pasture-band {
    padding: 0;
}

.band-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.contact-box {
    max-width: 680px;
}

.contact-mail {
    margin-top: 14px;
    font-size: 1rem;
    font-weight: 700;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #fbfaf7;
    padding: 20px 0;
    font-size: 0.92rem;
    color: var(--text-soft);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .split-layout,
    .split-layout.reverse,
    .visual-row,
    .service-card {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .portrait-card {
        max-width: 240px;
        justify-self: start;
    }

    .service-body {
        padding: 0 16px 16px;
    }

    .service-card img {
        max-height: 300px;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 0.95rem;
    }

    .section {
        padding: 44px 0;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        min-height: 44vh;
    }

    .hero-content {
        padding: 34px 0;
    }

    .hero-content h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .portrait-card {
        max-width: 200px;
    }

    .portrait-card img {
        max-height: 280px;
    }

    .band-image {
        height: 170px;
    }
}

/* ===== Encart rendez-vous visio (MonAssolement) — à ajouter en fin de style.css ===== */
.rdv-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.rdv-logo {
    width: 190px;
    flex: none;
    margin-top: 4px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 22px 0 26px;
}

.step-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 18px 8px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.rdv-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.rdv-columns ul {
    padding-left: 17px;
    margin-top: 6px;
}

.rdv-columns li {
    margin-bottom: 6px;
}

.button-primary {
    padding: 10px 20px;
    font-size: 1rem;
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.button-primary:hover {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 1024px) {
    .step-grid,
    .rdv-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .rdv-head {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .rdv-logo {
        width: 150px;
    }
}

/* Ancre du lien Facebook (…/index.html#infos) : l'en-tête reste collé en haut,
   on garde donc un décalage pour ne pas masquer le début de l'encart à l'arrivée. */
#infos {
    scroll-margin-top: 90px;
}

@media (max-width: 1024px) {
    #infos {
        scroll-margin-top: 110px;
    }
}

@media (max-width: 720px) {
    #infos {
        scroll-margin-top: 220px;
    }
}

/* ===== Refonte octobre 2026 : accroche, encart accompagnements, téléphone ===== */
.hero-subtitle {
    font-size: 1.02rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.button-light {
    background: rgba(255, 255, 255, 0.95);
    border-color: #ffffff;
    color: var(--accent-dark);
    padding: 10px 20px;
    font-size: 1rem;
}

.button-light:hover {
    background: #ffffff;
}

.button-line .button-link + .button-link {
    margin-left: 10px;
}

.card-link {
    margin-top: 10px;
    font-weight: 600;
    font-size: 1rem;
}

.services-cta {
    margin-top: 26px;
    text-align: center;
    font-size: 1rem;
}

.contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.contact-item {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
}

.contact-item:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.contact-kind {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
}

.contact-value {
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--heading);
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .contact-actions {
        grid-template-columns: 1fr;
    }

    .button-line .button-link + .button-link {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ===== Partenaires ===== */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 14px 14px;
    transition: border-color 0.15s, transform 0.15s;
}

.partner-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 72px;
}

.partner-logo img {
    width: auto;
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
}

/* Logos blancs d'origine (Ver de Terre, BHBZ) : affichés en foncé sur fond clair */
.partner-logo img.logo-sombre {
    filter: brightness(0);
    opacity: 0.8;
}

.partner-name {
    font-size: 0.85rem;
    color: var(--text-soft);
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 1024px) {
    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 720px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partner-logo {
        height: 60px;
    }

    .partner-logo img {
        max-height: 60px;
    }
}

.card-extra {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

/* ===== Vidéos ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.video-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.video-featured {
    grid-column: 1 / -1;
}

.video-frame,
.video-iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.video-frame {
    position: relative;
    padding: 0;
    background: #1c281c;
    cursor: pointer;
}

.video-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    transition: opacity 0.15s;
}

.video-frame:hover img {
    opacity: 1;
}

.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 50px;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    background: rgba(48, 68, 48, 0.9);
    transition: background 0.15s;
}

.video-play::after {
    content: "";
    position: absolute;
    left: 29px;
    top: 14px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}

.video-frame:hover .video-play {
    background: #c4302b;
}

.video-body {
    padding: 14px 18px 6px;
}

.video-body p {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.video-featured {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    align-items: center;
}

.video-featured .video-body {
    padding: 20px 24px;
}

.video-featured h3 {
    font-size: 1.35rem;
}

@media (max-width: 1024px) {
    .video-featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* Nombre impair de petites vidéos : la dernière s'affiche en large, comme la vidéo principale */
@media (min-width: 1025px) {
    .video-grid > .video-card:last-child:nth-child(even) {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1.7fr 1fr;
        align-items: center;
    }

    .video-grid > .video-card:last-child:nth-child(even) .video-body {
        padding: 20px 24px;
    }
}

/* ===== Entrée pâturage → système fourrager (27 octobre 2026) ===== */
.parcours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 22px 0 18px;
    position: relative;
}

.parcours-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 20px 12px;
    position: relative;
}

.parcours-card h3 {
    color: var(--heading);
    margin-bottom: 4px;
}

.parcours-question {
    font-style: italic;
    color: var(--text-soft);
    margin-bottom: 10px;
}

.parcours-card ul {
    padding-left: 18px;
}

.parcours-card li {
    margin-bottom: 6px;
}

/* Flèche entre les étapes : le parcours va du pâturage vers le système entier */
.parcours-card:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -17px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    z-index: 2;
}

.parcours-card-fin {
    border: 2px solid var(--accent);
}

.parcours-conclusion {
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: 18px;
}

#paturage {
    scroll-margin-top: 90px;
}

@media (max-width: 1024px) {
    .parcours-grid {
        grid-template-columns: 1fr;
    }

    .parcours-card:not(:last-child)::after {
        content: "↓";
        right: auto;
        left: 50%;
        top: auto;
        bottom: -17px;
        transform: translateX(-50%);
    }

    #paturage {
        scroll-margin-top: 110px;
    }
}

@media (max-width: 720px) {
    #paturage {
        scroll-margin-top: 220px;
    }
}

.parcours-outil {
    font-size: 0.9rem;
    color: var(--text-soft);
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 6px;
}

/* ===== Accueil : texte foncé sur un bandeau clair (28 octobre 2026) ===== */
.hero-clair .hero-overlay {
    background: rgba(255, 255, 255, 0.08);
}

.hero-clair .hero-content {
    color: #1d221d;
    background: rgba(251, 250, 247, 0.9);
    border-radius: var(--radius);
    padding: 30px 34px;
    margin-top: 42px;
    margin-bottom: 42px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.hero-clair .hero-content h1 {
    color: #1d221d;
}

.hero-clair .section-label.light {
    color: var(--accent);
}

.hero-clair .hero-subtitle {
    color: var(--accent-dark);
}

.hero-clair .hero-text {
    color: #2d312d;
}

.hero-clair .button-light {
    background: #ffffff;
    border-color: var(--accent);
}

@media (max-width: 720px) {
    .hero-clair .hero-content {
        width: calc(100% - 32px);
        padding: 22px 20px;
        margin-top: 24px;
        margin-bottom: 24px;
    }
}

/* =========================================================
   Encart « Mon parcellaire » (outil gratuit) — section Pâturage
   ========================================================= */
.outil-gratuit {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-top: 40px;
    padding: 28px 30px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 6px solid #5fae3e;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    scroll-margin-top: 90px;
}
.outil-gratuit-logo {
    flex: 0 0 96px;
    width: 96px;
}
.outil-gratuit-texte h3 {
    margin: 0 0 12px;
    color: var(--heading);
}
.outil-gratuit-texte .section-label {
    margin-bottom: 4px;
}
.outil-gratuit-texte ul {
    margin: 0 0 12px;
    padding-left: 1.2em;
}
.outil-gratuit-texte li {
    margin-bottom: 6px;
}
.outil-gratuit-note {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin: 0 0 14px;
}
.outil-gratuit .button-line {
    margin: 0;
}
@media (max-width: 720px) {
    .outil-gratuit {
        flex-direction: column;
        gap: 14px;
        padding: 22px 18px;
        border-left-width: 5px;
        scroll-margin-top: 260px; /* en-tête collant plus haut sur téléphone */
    }
    .outil-gratuit-logo {
        flex-basis: auto;
        width: 64px;
    }
}
