/* ============================================================
   TROTANNONCES — Design System 2026
   Source de vérité : charte 2026 (Accueil.html / trotannonces.css)
   Violine #A0539B · Prune #5B2E57 · Barlow / Barlow Condensed
   Tokens + base + typographie + composants primitifs partagés.
   La mise en page de la home vit dans trot-home-2026.css.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;1,600&family=Barlow+Condensed:wght@300;400;500;600;700&display=swap');

:root {
    /* ---------- Couleurs de marque ---------- */
    --trot-color-brand-violine: #A0539B;
    --trot-color-brand-violine-dark: #8A4386;
    --trot-color-brand-prune: #5B2E57;
    --trot-color-brand-prune-deep: #46223F;
    --trot-color-brand-prune-ink: #2E1A2B;
    --trot-color-highlight: #C98BC4;
    --trot-color-success: #3FA66A;

    /* ---------- Neutres (chauds, white-first) ---------- */
    --trot-color-white: #FFFFFF;
    --trot-color-surface: #FAF7FA;       /* bg-soft */
    --trot-color-surface-soft: #F6EFF5;  /* bg-tint */
    --trot-color-border: rgba(46, 26, 43, 0.10);
    --trot-color-border-strong: rgba(46, 26, 43, 0.16);
    --trot-color-border-accent: rgba(160, 83, 155, 0.22);
    --trot-color-violine-soft: rgba(160, 83, 155, 0.08);

    --trot-color-text: #2E1A2B;
    --trot-color-text-muted: rgba(46, 26, 43, 0.64);
    --trot-color-text-soft: rgba(46, 26, 43, 0.45);

    /* ---------- Typographie ---------- */
    --trot-font-sans: "Barlow", system-ui, Arial, sans-serif;
    --trot-font-display: "Barlow Condensed", "Barlow", Arial, sans-serif;

    --trot-fs-display: clamp(44px, 5.2vw, 72px);
    --trot-fs-section-title: clamp(32px, 4vw, 46px);
    --trot-fs-pro-title: 24px;
    --trot-fs-card-title: 18px;
    --trot-fs-body-lg: 19px;
    --trot-fs-body: 16px;
    --trot-fs-body-sm: 14.5px;
    --trot-fs-caption: 13px;
    --trot-fs-micro: 12.5px;

    --trot-fw-regular: 400;
    --trot-fw-medium: 500;
    --trot-fw-semibold: 600;
    --trot-fw-bold: 700;

    --trot-lh-display: 1.02;
    --trot-lh-title: 1.15;
    --trot-lh-card: 1.3;
    --trot-lh-copy: 1.55;

    --trot-tracking-display: 0.01em;
    --trot-tracking-kicker: 0.18em;
    --trot-tracking-caps: 0.08em;

    /* ---------- Échelle d'espacements ---------- */
    --trot-space-xs: 0.5rem;     /*  8px */
    --trot-space-sm: 0.75rem;    /* 12px */
    --trot-space-md: 1rem;       /* 16px */
    --trot-space-lg: 1.5rem;     /* 24px */
    --trot-space-xl: 2rem;       /* 32px */
    --trot-space-2xl: 3rem;      /* 48px */
    --trot-space-section: 5.5rem;/* 88px */

    /* ---------- Rayons ---------- */
    --trot-radius-sm: 10px;
    --trot-radius-md: 16px;   /* radius-card */
    --trot-radius-lg: 24px;
    --trot-radius-pill: 999px;

    /* ---------- Ombres ---------- */
    --trot-shadow-card: 0 1px 2px rgba(46, 26, 43, 0.04), 0 8px 24px rgba(46, 26, 43, 0.06);
    --trot-shadow-pop: 0 12px 40px rgba(91, 46, 87, 0.16);

    --trot-maxw: 1240px;

    /* ---------- Alias courts (utilisés par la home) ---------- */
    --violine: var(--trot-color-brand-violine);
    --violine-dark: var(--trot-color-brand-violine-dark);
    --violine-soft: var(--trot-color-violine-soft);
    --violine-border: var(--trot-color-border-accent);
    --prune: var(--trot-color-brand-prune);
    --prune-deep: var(--trot-color-brand-prune-deep);
    --prune-ink: var(--trot-color-brand-prune-ink);
    --bg: var(--trot-color-white);
    --bg-soft: var(--trot-color-surface);
    --bg-tint: var(--trot-color-surface-soft);
    --ink: var(--trot-color-text);
    --ink-muted: var(--trot-color-text-muted);
    --ink-soft: var(--trot-color-text-soft);
    --border: var(--trot-color-border);
    --border-strong: var(--trot-color-border-strong);
    --radius-card: var(--trot-radius-md);
    --radius-lg: var(--trot-radius-lg);
    --shadow-card: var(--trot-shadow-card);
    --shadow-pop: var(--trot-shadow-pop);
    --font: var(--trot-font-sans);
    --font-cond: var(--trot-font-display);
    --maxw: var(--trot-maxw);
}

/* ============================================================
   BASE — scopée aux conteneurs Trotannonces (pas de reset global,
   pour ne pas impacter le reste de la page WordPress/Elementor).
   ============================================================ */
/* Scope via :where() pour ne PAS gonfler la spécificité : ces resets
   se comportent comme des sélecteurs d'élément (les classes composants priment). */
.trot-home-2026,
.site-header,
.site-footer {
    color: var(--ink);
    font-family: var(--font);
    line-height: var(--trot-lh-copy);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Police de marque (Barlow) sur TOUTES nos pages, pas seulement la home.
   Sans ça, les éléments sans police explicite (prix, fil d'ariane, région, réf…)
   héritaient de la police du thème/Elementor et cassaient l'harmonie typographique.
   On ne fixe QUE la police ici (pas la couleur) pour ne pas casser les fonds sombres. */
.trot-single-2026,
.trot-listings-container,
.trot-page-wrap,
.trot-dashboard-2026,
.trot-submit-2026,
.trot-subscription-2026 {
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

:where(.trot-home-2026, .site-header, .site-footer) * {
    box-sizing: border-box;
}

:where(.trot-home-2026) :is(h1, h2, h3, h4, p, ul, figure),
:where(.site-header, .site-footer) :is(p, h4) {
    margin: 0;
}

:where(.trot-home-2026) ul {
    list-style: none;
    padding: 0;
}

:where(.trot-home-2026, .site-header, .site-footer) img {
    display: block;
    max-width: 100%;
}

:where(.trot-home-2026, .site-header, .site-footer) a {
    color: inherit;
    text-decoration: none;
}

:where(.trot-home-2026) button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* ============================================================
   CONTENEUR
   ============================================================ */
.trot-home-wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
}

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

/* Titres display : Barlow Condensed, majuscules (identité de marque) */
.display-title,
.section-title {
    font-family: var(--font-cond);
    font-weight: var(--trot-fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--trot-tracking-display);
    line-height: var(--trot-lh-display);
    color: var(--prune-ink);
}

.hero-title {
    font-size: var(--trot-fs-display);
}

.section-title {
    font-size: var(--trot-fs-section-title);
}

.hero-title em,
.section-title em {
    font-style: normal;
    color: var(--violine);
}

/* Sous-titre de section */
.section-subtitle {
    margin-top: 10px;
    max-width: 540px;
    color: var(--ink-muted);
    font-size: 17px;
    line-height: var(--trot-lh-copy);
}

/* Titre de carte annonce : Barlow, casse normale */
.card-title {
    font-family: var(--font);
    font-size: var(--trot-fs-card-title);
    font-weight: var(--trot-fw-semibold);
    line-height: var(--trot-lh-card);
    text-transform: none;
    color: var(--prune-ink);
}

/* Titre pro : Barlow Condensed majuscules */
.pro-title {
    font-family: var(--font-cond);
    font-size: var(--trot-fs-pro-title);
    font-weight: var(--trot-fw-semibold);
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--prune-ink);
}

/* Kicker / label de section */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 16.5px;
    font-weight: var(--trot-fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violine);
}

.section-label::before {
    content: "";
    width: 22px;
    height: 2px;
    background: currentColor;
}

/* ============================================================
   NEUTRALISATION DE LA BORDURE ROSE #CC3366
   Le reset d'ElementsKit applique `border: 1px solid #CC3366` à
   `button, [type="button"], [type="submit"]` — spécificité (0,1,0),
   identique à nos `.btn`, donc c'est l'ordre de chargement qui tranchait
   et le reset gagnait (ex : bouton RECHERCHER de la barre de filtres).
   On neutralise à (0,2,0) dans toute l'interface Trotannonces, puis on
   redéclare explicitement les bordures voulues (variantes "ghost").
   ============================================================ */
:is(.trot-home-2026, .site-header, .site-footer, .trot-single-2026,
    .trot-listings-container, .trot-page-wrap, .trot-modal,
    .trot-subscription-2026, .trot-submit-2026, .trot-dashboard-2026,
    .trot-dashboard-content, .trot-dashboard-sidebar)
:is(button, [type="button"], [type="submit"]) {
    border-color: transparent;
}

/* Bordures volontaires, réaffirmées au-dessus de la neutralisation (0,2,1). */
button.btn.btn-ghost,
a.btn.btn-ghost {
    border: 1px solid var(--border-strong);
}

button.btn.btn-ghost-light,
a.btn.btn-ghost-light {
    border: 1px solid rgba(255, 255, 255, 0.35);
}

button.trot-modal-btn.trot-modal-btn--ghost {
    border: 1px solid var(--border-strong);
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    border: none;
    border-radius: var(--trot-radius-pill);
    font-family: var(--font);
    font-size: 16px;
    font-weight: var(--trot-fw-semibold);
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}

.btn:active {
    transform: scale(0.96);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--violine);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--violine-dark);
}

.btn-prune {
    background: var(--prune);
    color: #fff !important;
}

.btn-prune:hover {
    background: var(--prune-deep);
}

.btn-ghost {
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--prune-ink);
}

.btn-ghost:hover {
    border-color: var(--violine);
    color: var(--violine);
}

/* Correctif contraste — le kit Elementor impose `.elementor-kit-20 a:hover { color:#FFFFFF }`
   (spécificité 0,2,1), qui rendait le texte des boutons ghost <a> BLANC SUR BLANC au survol.
   On reprend la main à spécificité supérieure (0,3,1). */
a.btn.btn-ghost:hover,
a.btn.btn-ghost:focus,
button.btn.btn-ghost:hover,
button.btn.btn-ghost:focus {
    color: var(--violine);
    background: var(--violine-soft);
    border-color: var(--violine);
}

.btn-ghost-light {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff !important;
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Durcissement face au kit Elementor (.elementor-kit-NN button, spécificité 0,1,1)
   qui impose sa couleur de fond aux boutons. Double classe = 0,2,x. */
.btn.btn-primary {
    background: var(--violine);
}

.btn.btn-primary:hover {
    background: var(--violine-dark);
}

.btn.btn-prune {
    background: var(--prune);
}

.btn.btn-prune:hover {
    background: var(--prune-deep);
}

.btn.btn-ghost,
.btn.btn-ghost-light {
    background: transparent;
}

.btn.btn-ghost {
    background: #fff;
}

.btn.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ============================================================
   CHIPS
   ============================================================ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--trot-radius-pill);
    background: #fff;
    color: var(--ink-muted);
    font-size: 14px;
    font-weight: var(--trot-fw-medium);
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.chip:hover {
    border-color: var(--violine);
    color: var(--violine);
    background: var(--violine-soft);
}

.chip svg {
    width: 15px;
    height: 15px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 6px;
    font-family: var(--font-cond);
    font-size: 13px;
    font-weight: var(--trot-fw-semibold);
    letter-spacing: var(--trot-tracking-caps);
    text-transform: uppercase;
}

.badge-premium {
    background: var(--prune);
    color: #fff;
}

.badge-cat {
    border: 1px solid var(--violine-border);
    background: var(--violine-soft);
    color: var(--violine);
}

.badge-urgent {
    background: #D64545;
    color: #fff;
    letter-spacing: 0.1em;
}

.badge svg {
    width: 12px;
    height: 12px;
}

/* ============================================================
   ICÔNES SVG (remplacent les anciens emojis)
   ============================================================ */
svg.trot-ico {
    width: 1em;
    height: 1em;
    flex: none;
    vertical-align: -0.14em;
}

@media (max-width: 640px) {
    .trot-home-wrap {
        padding-left: 20px;
        padding-right: 20px;
    }
}
