/* ==========================================================================
   Haras d'As — proposition de design libre.
   Identité "équestre haut de gamme" : vert bouteille riche + or antique,
   crème neutre (pas jaune). Serif de caractère (Fraunces) pour les titres,
   Inter pour le corps.
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-variable-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/fraunces-variable-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/fraunces-variable-italic.woff2') format('woff2');
}

:root {
    --forest: #163d2e;
    --forest-deep: #0d251c;
    --cream: #f6f5f1;
    --cream-deep: #ece9e0;
    --pasture-green: #dfe9d1;
    --gold: #b6942f;
    --gold-dark: #8f7323;
    --gold-soft: rgba(182, 148, 47, 0.12);
    --text: #34362f;
    --text-soft: #666458;
    --border-soft: rgba(13, 37, 28, 0.1);

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --shadow-soft: 0 10px 30px rgba(28, 39, 33, 0.08);
    --shadow-hover: 0 20px 45px rgba(28, 39, 33, 0.14);

    --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- Base ------------------------------------------------------------------ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--forest-deep);
    font-weight: 600;
    line-height: 1.15;
}

h2 { font-size: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.3rem; }

p.lead { color: var(--text-soft); font-size: 1.15rem; }

a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--forest-deep); }

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 0.75rem;
}

.skip-link {
    position: absolute;
    top: 0; left: 0;
    z-index: 2000;
    background: var(--forest-deep);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) 0;
}

.section-cream { background-color: var(--cream); }
.section-forest { background-color: var(--forest-deep); color: #e6e2d6; }
.section-forest h2, .section-forest h3 { color: #fff; }

/* Espacement généreux entre les grandes sections de l'accueil. */
.section-spacious { padding-top: 6rem; padding-bottom: 6rem; }
.section-tall { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 992px) {
    .section-tall {
        min-height: calc(92vh + 10px);
        display: flex;
        align-items: center;
    }
    .section-spacious { padding-top: 8rem; padding-bottom: 8rem; }
}

/* --- Navigation -------------------------------------------------------------- */

.site-header {
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--border-soft);
}
.site-header .navbar { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.site-header .navbar-brand {
    display: flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-serif);
    font-size: 1.15rem; font-weight: 600;
    color: var(--forest-deep);
}
.site-header .nav-link {
    color: var(--forest-deep);
    font-weight: 500;
    font-size: 0.92rem;
    margin: 0 0.55rem;
    opacity: 0.75;
}
.site-header .nav-link:hover, .site-header .nav-link.active {
    color: var(--gold-dark);
    opacity: 1;
}
/* Centrage réel des liens du menu, indépendant de la largeur du logo/du sélecteur
   de langue (un simple "margin: auto" les centre dans l'espace restant entre les
   deux, pas dans la barre entière — ce qui les décale visuellement). */
@media (min-width: 992px) {
    .site-header .navbar > .container {
        position: relative;
    }
    .site-header .navbar-nav {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}
.nav-extras {
    display: flex; align-items: center; gap: 1rem;
    margin-left: auto;
}
.lang-switch {
    display: flex;
    background: var(--cream);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 2px;
}
.lang-switch a {
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
}
.lang-switch a.active {
    background: var(--forest-deep);
    color: #fff;
}
.lang-switch a:hover:not(.active) {
    color: var(--forest-deep);
}

@media (max-width: 991.98px) {
    .nav-extras {
        margin-left: 0; margin-top: 1rem; padding-top: 1rem;
        border-top: 1px solid var(--border-soft);
        justify-content: space-between;
    }
}

/* --- Hero plein écran (Accueil) --------------------------------------------- */

.hero {
    position: relative;
    /* Pleine hauteur d'écran moins la hauteur de la nav (sticky, donc dans le flux) :
       évite à la fois le bord blanc (hero trop court) et le débordement (hero + nav > 100vh). */
    min-height: calc(100vh - 62px);
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero--home { background-image: url('../img/apropos.jpg'); }
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(28,39,33,0.55) 0%, rgba(28,39,33,0.72) 60%, rgba(28,39,33,0.85) 100%);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}
.hero h1 {
    color: #fff;
    font-size: clamp(2.75rem, 2.1rem + 3vw, 4.5rem);
    text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero p.lead {
    color: #ede9dd;
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
    text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
.hero .eyebrow { color: #e7c9a9; }

.scroll-cue {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: #fff;
    opacity: 0.85;
    font-size: 0.8rem;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.scroll-cue span {
    display: block;
    width: 1px; height: 28px;
    background: rgba(255,255,255,0.6);
    margin: 0.5rem auto 0;
    animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50% { transform: scaleY(0.5); opacity: 1; }
}

/* --- Bandeau de confiance ---------------------------------------------------- */

.trust-bar {
    /* Vert clair "herbe des pâtures" (nature/confiance) plutôt que le crème neutre utilisé
       ailleurs sur le site : contraste vérifié >= 3:1 avec --gold-dark (chiffres) et >= 4.5:1
       avec --text-soft (libellés), donc toujours lisible. */
    background: var(--pasture-green);
}
.trust-item {
    text-align: center;
    padding: 2.75rem 1rem;
}
.trust-item .trust-figure {
    font-family: var(--font-serif);
    /* Fluide (vw) plutôt qu'une taille fixe : rétrécit sur mobile pour ne plus déborder,
       mais atteint déjà son plafond de 2.1rem dès ~840px de large — le rendu desktop
       (≥992px) reste donc strictement identique à avant. */
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    color: var(--gold-dark);
    font-weight: 600;
    display: block;
    font-variant-numeric: tabular-nums;
}
.trust-item .trust-label {
    color: var(--text-soft);
    font-size: clamp(0.75rem, 2.2vw, 0.9rem);
}

/* --- Cartes "hub" (Installations / Services / Chevaux) ----------------------- */

.hub-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 380px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hub-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.hub-card--installations { background-image: url('../img/boxes_interieur_2019.jpg'); }
.hub-card--services      { background-image: url('../img/pansage.jpg'); }
.hub-card--chevaux       { background-image: url('../img/elevage.jpg'); }
.hub-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(28,39,33,0) 35%, rgba(28,39,33,0.9) 100%);
}
.hub-card-body {
    position: relative;
    z-index: 1;
    padding: 1.75rem;
    color: #fff;
}
.hub-card-body h3 { color: #fff; margin-bottom: 0.35rem; }
.hub-card-body p { color: #e2ded1; font-size: 0.95rem; margin-bottom: 0.75rem; }
.hub-card-link {
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hub-card-link::after { content: ' →'; }

/* --- Bannières de page (Installations / Services / Chevaux / Contact) - */

.page-hero {
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-hero--installations { background-image: url('../img/apropos.jpg'); }
.page-hero--services      { background-image: url('../img/pansage.jpg'); }
.page-hero--chevaux       { background-image: url('../img/elevage.jpg'); }

.page-hero-overlay {
    width: 100%; height: 100%;
    padding: 3.5rem 2rem;
    text-align: center;
}
.page-hero-overlay h1 {
    color: #fff;
    font-size: clamp(2rem, 1.6rem + 2vw, 3rem);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.page-hero-overlay p {
    color: #f4f2ec;
    font-size: 1.05rem;
    margin: 0;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* --- Panneaux (Installations) ------------------------------------------------ */

.feature-row {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    margin-bottom: 3rem;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row img {
    width: 100%; height: 100%; max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
}
/* Carrousel Pistes : hauteur fixe (et non un simple plafond) pour que les deux
   images gardent exactement la même taille d'un slide à l'autre. */
.feature-row .carousel-item img {
    height: 320px;
    max-height: none;
}

/* --- Listes à puce cuivre ----------------------------------------------------- */

.list-check li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.75rem;
    border-bottom: 1px solid var(--border-soft);
}
.list-check li:first-child { border-top: 1px solid var(--border-soft); }
.list-check li::before {
    content: '';
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 1.1em; height: 1.1em;
    background: url('../img/icone_check.svg') no-repeat center / contain;
}

/* --- Services : cartes tarifaires --------------------------------------------- */

.pricing-card {
    position: relative;
    background: #fff;
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Fine ligne dorée en haut de carte plutôt qu'un cadre complet : plus discret, plus luxueux. */
.pricing-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gold);
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.pricing-card .card-header {
    background: transparent;
    border: 0;
    text-align: center;
    padding: 2.75rem 1.75rem 0.5rem;
}
.pricing-card .card-header h3 {
    margin: 0; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.1em;
    color: var(--text-soft); font-family: var(--font-sans); font-weight: 700;
}
.pricing-card .card-body { padding: 1.25rem 2rem 2.75rem; }

.pricing-badge {
    display: inline-block;
    background: var(--forest-deep);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.85rem;
}

.pricing-card-highlight::before {
    height: 5px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}
.pricing-card-highlight {
    box-shadow: 0 16px 40px rgba(182, 148, 47, 0.22);
}
.pricing-card-highlight:hover {
    box-shadow: 0 22px 50px rgba(182, 148, 47, 0.28);
}

.pricing-from { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--text-soft); margin-bottom: 0.25rem; }
.pricing-amount { font-family: var(--font-serif); font-size: 2.6rem; font-weight: 600; color: var(--forest-deep); margin-bottom: 1.5rem; }
.pricing-amount span { font-size: 1rem; font-weight: 500; color: var(--text-soft); font-family: var(--font-sans); }

/* --- Chevaux à vendre ---------------------------------------------------------- */

.horse-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.horse-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
/* object-fit: contain (et non cover) : les photos ont des cadrages/orientations très
   différents (portrait téléphone vs paysage), un recadrage forcé coupait systématiquement
   une partie du cheval quel que soit l'ancrage choisi. "contain" affiche la photo entière,
   quitte à laisser un léger bandeau de fond sur les côtés pour les portraits. */
.horse-card img { height: 320px; object-fit: contain; background-color: var(--cream); }
.horse-specs li { border-bottom: 1px dotted var(--border-soft); padding: 0.35rem 0; }
.horse-specs li span { color: var(--text-soft); float: right; }

/* --- Boutons -------------------------------------------------------------------- */

.btn { border-radius: var(--radius-pill); font-weight: 600; font-size: 0.95rem; }
.btn-gold { background-color: var(--gold); border-color: var(--gold); color: #fff; padding: 0.7rem 2.2rem; }
.btn-gold:hover { background-color: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-outline-gold { border: 1px solid var(--gold); color: var(--gold-dark); padding: 0.7rem 2.2rem; background: transparent; }
.btn-outline-gold:hover { background-color: var(--gold); color: #fff; }
.btn-outline-cream { border: 1px solid rgba(255,255,255,0.7); color: #fff; padding: 0.7rem 2.2rem; background: transparent; }
.btn-outline-cream:hover { background-color: #fff; color: var(--forest-deep); }
.btn-sm.btn-gold, .btn-sm.btn-outline-gold { padding: 0.45rem 1.2rem; font-size: 0.85rem; }

/* --- Formulaire de contact -------------------------------------------------------- */

.form-control, .input-group-text {
    border-radius: var(--radius-sm) !important;
    border-color: var(--border-soft);
    padding: 0.65rem 0.9rem;
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 0.2rem rgba(184, 103, 47, 0.15); }
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--forest-deep); }
.alert { border-radius: var(--radius-md); }

.honeypot-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.captcha-question { font-weight: 600; background-color: var(--cream); }

.panel-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
}
.panel-card--flush { padding: 0; }

/* --- Contact : cartes coordonnées ------------------------------------------------- */

.contact-info-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2.25rem 1.5rem;
    height: 100%;
    text-align: center;
}
.contact-info-card h3 { margin-bottom: 0.4rem; }
.contact-info-card p { margin-bottom: 0; color: var(--text-soft); }
.contact-info-icon {
    display: inline-block;
    width: 30px; height: 30px;
    margin-bottom: 1rem;
    background-color: var(--gold-dark);
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
}
.contact-info-icon--map   { -webkit-mask-image: url('../img/icone_map-marker-alt.svg'); mask-image: url('../img/icone_map-marker-alt.svg'); }
.contact-info-icon--phone { -webkit-mask-image: url('../img/icone_phone-alt.svg'); mask-image: url('../img/icone_phone-alt.svg'); }
.contact-info-icon--clock { -webkit-mask-image: url('../img/icone_clock.svg'); mask-image: url('../img/icone_clock.svg'); }

.map-link { position: relative; display: block; height: 100%; min-height: 260px; }
.map-link--wide { min-height: 360px; }
.map-image { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; transition: filter 0.2s ease; }
.map-link-badge {
    position: absolute; inset: auto auto 1.25rem 1.25rem;
    background: rgba(28,39,33,0.88); color: #fff;
    font-size: 0.85rem; font-weight: 600;
    padding: 0.55rem 1.1rem; border-radius: var(--radius-pill);
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.map-link:hover .map-image { filter: brightness(0.85); }
.map-link:hover .map-link-badge { opacity: 1; transform: translateY(0); }
@media (max-width: 991.98px) { .map-link-badge { opacity: 1; transform: none; } }
@media (max-width: 767.98px) {
    /* Sur mobile, la largeur du conteneur rend l'image (ratio ~3.5:1) plus basse que le
       min-height hérité de .map-link--wide (360px) : un vide apparaissait sous l'image,
       où le badge se retrouvait seul. On fige une hauteur identique sur les deux éléments. */
    .map-link,
    .map-link--wide {
        height: 260px;
        min-height: 260px;
    }
    .map-image {
        height: 260px;
        min-height: 260px;
    }
}

/* --- Bannière CTA (Installations / Chevaux à vendre) ------------------------------- */

.cta-banner {
    background: var(--pasture-green);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--gold-dark);
}
.cta-banner h2 { color: var(--gold-dark); }
.cta-banner p { color: var(--gold-dark); }
.cta-banner p.lead { max-width: 520px; margin-left: auto; margin-right: auto; }

/* --- Photos d'archives (Accueil) ----------------------------------------------- */

.archive-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}
.archive-caption {
    font-size: 0.85rem;
    color: var(--text-soft);
}

/* --- Footer ------------------------------------------------------------------------ */

.site-footer {
    background-color: var(--forest-deep);
    color: #cfc9b8;
}
.footer-brand {
    display: flex; align-items: center; gap: 0.65rem;
    font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600;
    color: #fff; margin-bottom: 0.75rem;
}
/* Logo recoloré via mask CSS (même technique que les autres icônes du site) plutôt qu'un
   filtre approximatif : couleur exacte garantie, y compris si la palette change un jour. */
.footer-logo {
    display: inline-block;
    width: 25px; height: 40px;
    background-color: #fff;
    -webkit-mask-image: url('../img/logo_harasdas.svg');
    mask-image: url('../img/logo_harasdas.svg');
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
}
.footer-tagline { font-size: 0.9rem; color: #b7b1a0; }
.site-footer a { color: #cfc9b8; }
.site-footer a:hover { color: #fff; }
.footer-copyright { color: #a19b89; }

@media (max-width: 767px) {
    .hero { min-height: 78vh; }
    /* Le bloc de contenu du hero est centré verticalement dans .hero (align-items:center) :
       une marge ajoutée sous ce bloc n'est visuellement "gagnée" qu'à moitié (le centrage
       redistribue l'autre moitié au-dessus, invisible). Valeur volontairement généreuse
       pour obtenir un vrai espace visible avant le "scroll-cue" (positionné en absolu tout
       en bas de .hero) sans que le bouton n'ait l'air collé dessus. */
    .hero-content { margin-bottom: 6rem; }
    .feature-row { padding: 1.75rem; }
    .page-hero { background-attachment: scroll; }
}
