/* ═══════════════════════════════════════════════
   LES VACHES LAITIÈRES — Styles
   Police titres : Manrope
   Police corps : Inter
═══════════════════════════════════════════════ */

:root {
    /* Fond global (gris très foncé) pour éviter le “noir sur noir” */
    --bg: #16171a;
    --card: #1f2024;
    --text: #f5f5f5;
    --text-soft: #c5c5c5;
    --muted: #888;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #fff;
    --accent-soft: rgba(255, 255, 255, 0.15);
    --highlight: #d4a574;
    /* Couleur CTA (bleu inspiré du ciel de l’affiche) */
    --cta: #4aa3ff;
    --cta-hover: #76bbff;
    --cta-text: #081018;
    --radius: 20px;
    --radius-sm: 12px;
    --font-title: 'Manrope', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Liens */
a, a:visited, a:link { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

/* Titres */
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; color: var(--text-soft); }

/* ─── Layout ─── */
.wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--highlight);
    text-decoration: none;
}
.brand:visited { color: var(--highlight); }

.main {
    padding: 32px 20px 64px;
}

.footer {
    text-align: center;
    padding: 32px 20px;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--line);
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.footer-logo img {
    height: 34px;
    width: auto;
    display: block;
    opacity: 0.9;
    filter: grayscale(100%);
}
.footer-logo:hover img {
    opacity: 1;
    filter: none;
}

/* ─── Hero ─── */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    text-align: center;
}

.hero-text h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); margin-bottom: 1rem; }
.tagline { font-size: 1.1rem; color: var(--text-soft); margin: 0 0 1.5rem; line-height: 1.6; }
.question { font-family: var(--font-title); font-size: 1.25rem; font-style: italic; color: var(--highlight); margin: 0 0 1rem; }
.cta-hero { justify-content: center; }
.poster-container { display: flex; justify-content: center; }
.poster { width: min(85vw, 420px); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,0.6); }

@media (min-width: 768px) {
    .hero { grid-template-columns: 1fr 400px; text-align: left; gap: 48px; }
    .cta-hero { justify-content: flex-start; }
}

/* ─── Cards ─── */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.card-large { padding: 32px; }
.card-centered { text-align: center; max-width: 500px; margin: 3rem auto; }
.card h1 { margin-top: 0; }
.intro { font-size: 1.05rem; color: var(--text-soft); margin-bottom: 1.5rem; }
.pitch { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; }

/* ─── Credits ─── */
.credits { list-style: none; padding: 0; margin: 0; }
.credits li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.credits li:last-child { border-bottom: none; }
.credits .role { color: var(--muted); font-size: 0.9rem; min-width: 160px; }

/* ─── Actions grid ─── */
.actions-grid { display: grid; gap: 20px; margin: 1.5rem 0; }
.action-block { padding: 24px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: var(--radius); }
.action-block h2 { margin-top: 0; font-size: 1.2rem; color: var(--text); }
.action-block p { color: var(--text-soft); margin-bottom: 1rem; }
.action-block-highlight { background: rgba(212,165,116,0.08); border-color: rgba(212,165,116,0.2); }

@media (min-width: 640px) {
    .actions-grid { grid-template-columns: repeat(2, 1fr); }
    .action-block-highlight { grid-column: span 2; }
}

/* ─── Actions grid alignée (desktop) ─── */
@media (min-width: 640px) {
    .actions-grid-aligned {
        grid-template-columns: repeat(2, 1fr);
    }
    .actions-grid-aligned .action-block {
        display: flex;
        flex-direction: column;
    }
    .actions-grid-aligned .action-block h2 {
        min-height: 2.4em;
    }
    .actions-grid-aligned .action-block p {
        flex: 1;
    }
    .actions-grid-aligned .action-block .cta {
        margin-top: auto;
    }
}

/* ─── Resources ─── */
.resources { display: grid; gap: 12px; margin: 1.5rem 0; }
/* Entrée homogène (titre + description + actions) */
.resource-entry {
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.resource-entry:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
}
.resource-title {
    display: block;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 6px;
}
.resource-desc {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.45;
}
.resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.resource-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1;
}
.resource-chip:hover {
    background: rgba(74, 163, 255, 0.12);
    border-color: rgba(74, 163, 255, 0.22);
    color: var(--text);
    opacity: 1;
}
.resource-chip strong {
    font-weight: 600;
    color: inherit;
}
.resource-chip-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}
.resource-entry-highlight {
    background: rgba(212,165,116,0.08);
    border-color: rgba(212,165,116,0.18);
}
/* compat : anciens liens */
.resource-link {
    display: block;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
}
.resource-link:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); opacity: 1; }
.resource-link strong { display: block; font-size: 1.1rem; color: var(--text); margin-bottom: 4px; }
.resource-link span { font-size: 0.9rem; color: var(--muted); }
.resource-link-phone { background: rgba(212,165,116,0.08); border-color: rgba(212,165,116,0.2); }
.resource-link-phone strong { color: var(--highlight); font-size: 1.3rem; letter-spacing: 0.05em; }

/* ─── Buttons ─── */
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/*
Boutons “robustes” :
- fond + texte explicitement fixés
- :visited neutralisé
*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 650;
    text-decoration: none;

    background: var(--cta);
    color: var(--cta-text);

    border: 1px solid rgba(74, 163, 255, 0.55);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}
.btn:visited { color: var(--cta-text); }
.btn:hover {
    transform: translateY(-2px);
    background: var(--cta-hover);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.40);
    opacity: 1;
}
.btn:active { transform: translateY(0); }
.btn-large { padding: 16px 36px; font-size: 1.05rem; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid rgba(74, 163, 255, 0.35);
    box-shadow: none;
}
.btn-secondary:visited { color: var(--text); }
.btn-secondary:hover {
    background: rgba(74, 163, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ─── Témoignages ─── */
.testimonials { display: flex; flex-direction: column; gap: 24px; }
.testimonial {
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-left: 3px solid var(--highlight);
}
.testimonial blockquote { margin: 0 0 12px; font-size: 1.1rem; font-style: italic; line-height: 1.7; }
.testimonial cite { font-style: normal; font-size: 0.9rem; color: var(--muted); }

/* ─── Formulaire ─── */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { font-size: 0.95rem; color: var(--text-soft); }
.form input, .form textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(255,255,255,0.05); }
/* ─── Custom select (glass) ─── */
.custom-select {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    user-select: none;
}
.custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}
.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus {
    outline: none;
    border-color: var(--cta);
    box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.15);
}
.custom-select-trigger .cs-placeholder {
    color: var(--muted);
}
.custom-select-arrow {
    width: 12px;
    height: 8px;
    flex-shrink: 0;
    margin-left: 12px;
    transition: transform 0.2s;
}
.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}
.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(31, 32, 36, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 6px 0;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.custom-select.open .custom-select-options {
    display: block;
}
.custom-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-soft);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.custom-select-option:hover {
    background: rgba(74, 163, 255, 0.12);
    color: var(--text);
}
.custom-select-option.selected {
    color: var(--cta);
    font-weight: 500;
}
.custom-select-option .cs-check {
    width: 16px;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.85rem;
}
.form textarea { min-height: 150px; resize: vertical; }

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255,255,255,0.02);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
}
.check input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; }
.check label { font-size: 0.9rem; color: var(--text-soft); }

.error {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    background: rgba(220,80,80,0.1);
    border: 1px solid rgba(220,80,80,0.25);
    color: #f5a5a5;
}

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ─── Message de confirmation ─── */
.success-icon { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.success-icon span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--cta);
    border-radius: 50%;
    font-size: 2rem;
}
/* ─── Pitch ─── */
.pitch p {
    margin: 0;
    color: var(--text-soft);
}
.pitch strong {
    color: var(--text);
}
/* ─── Matomo opt-out (mentions légales) ─── */
.optout-box {
    margin-top: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(74, 163, 255, 0.35);
    background: rgba(74, 163, 255, 0.08);
}
.optout-iframe {
    width: 100%;
    height: 220px;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
}
/* ─── Invitations donateurs ─── */
.invitation-card {
    text-align: center;
    max-width: 560px;
    margin: 2rem auto;
}
.invitation-poster-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.invitation-poster {
    width: min(70vw, 280px);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.invitation-intro {
    text-align: left;
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.invitation-intro strong {
    color: var(--text);
}
.invitation-recap {
    text-align: left;
}
.recap-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 1.5rem 0;
}
.recap-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.recap-row:last-child {
    border-bottom: none;
}
.recap-label {
    min-width: 100px;
    color: var(--muted);
    font-size: 0.9rem;
}
.recap-value {
    color: var(--text);
    font-weight: 500;
}
.invitation-notice {
    background: rgba(212,165,116,0.08);
    border: 1px solid rgba(212,165,116,0.2);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin: 1.5rem 0;
}
.invitation-notice p {
    margin: 0;
    color: var(--text-soft);
}
.invitation-notice strong {
    color: var(--highlight);
}
.calendar-title {
    text-align: center;
    font-size: 1.15rem;
    margin: 2rem 0 1rem;
}
.calendar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.invitation-callout {
    margin-top: 2.5rem;
    padding: 24px;
    background: rgba(74, 163, 255, 0.08);
    border: 1px solid rgba(74, 163, 255, 0.25);
    border-radius: var(--radius-sm);
    text-align: center;
}
.invitation-callout p {
    margin: 0 0 1rem;
    color: var(--text-soft);
    font-size: 1.05rem;
}
/* ─── Modale de confirmation ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 20px;
}
.modal-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}
.modal-box p {
    color: var(--text-soft);
    line-height: 1.7;
    margin: 0 0 1.5rem;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
/* ─── Contreparties donateurs ─── */
/* Fieldset reset & styling */
.contrepartie-fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 0 0 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.contrepartie-fieldset legend {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-soft);
    padding: 0 8px;
}
/* ── Toggle switches ── */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    user-select: none;
}
.toggle-row:last-of-type {
    border-bottom: none;
}
.toggle-label {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 500;
}
/* Hide native checkbox */
.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* Switch track */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    flex-shrink: 0;
    margin-left: 16px;
    transition: background 0.25s, border-color 0.25s;
}
/* Switch knob */
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--muted);
    border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}
/* Checked state */
.toggle-input:checked + .toggle-switch {
    background: rgba(74, 163, 255, 0.25);
    border-color: rgba(74, 163, 255, 0.45);
}
.toggle-input:checked + .toggle-switch::after {
    transform: translateX(22px);
    background: var(--cta);
}
/* Focus ring */
.toggle-input:focus-visible + .toggle-switch {
    box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.2);
}
/* ── Radio buttons ── */
.radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 6px 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, border-color 0.2s;
}
.radio-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line);
}
/* Hide native radio */
.radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* Custom radio circle */
.radio-custom {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--cta);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s;
}
/* Checked state */
.radio-input:checked + .radio-custom {
    border-color: var(--cta);
}
.radio-input:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}
/* Selected row highlight */
.radio-input:checked ~ span {
    color: var(--text);
}
/* Focus ring */
.radio-input:focus-visible + .radio-custom {
    box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.2);
}
/* ── Adresse textarea (contreparties) ── */
#adresse-section,
#representation-section {
    padding: 0 16px 8px;
}
#adresse-section label,
#representation-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-soft);
}
#adresse {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    min-height: 100px;
    resize: vertical;
}
#adresse::placeholder {
    color: var(--muted);
}
#adresse:focus {
    outline: none;
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}
/* ── Smooth reveal animations ── */
#remise-section,
#adresse-section,
#representation-section {
    transition: opacity 0.3s ease;
}