/* ==========================================================================
   AgriForma - Formations Agriculteurs - Vitrine / Lead Gen
   ========================================================================== */

:root {
    --green-800: #1B5E20;
    --green-700: #2E7D32;
    --green-600: #388E3C;
    --green-500: #43A047;
    --green-100: #E8F5E9;
    --green-50: #F1F8E9;
    --beige: #FFF8E1;
    --beige-dark: #F5E6C8;
    --earth: #5D4037;
    --earth-light: #8D6E63;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-500: #9E9E9E;
    --gray-700: #616161;
    --gray-900: #212121;
    --red-500: #E53935;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 50px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.hidden { display: none !important; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--radius-md); font-family: var(--font);
    font-size: 1rem; font-weight: 600; border: none; cursor: pointer;
    transition: all var(--transition); text-align: center; white-space: nowrap;
}
.btn--primary { background: var(--green-600); color: var(--white); }
.btn--primary:hover { background: var(--green-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }
.btn--outline:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.btn--sm { padding: 10px 20px; font-size: 0.875rem; }
.btn--lg { padding: 16px 36px; font-size: 1.1rem; }
.btn--full { width: 100%; }
.btn--whatsapp { background: #25D366; color: var(--white); }
.btn--whatsapp:hover { background: #1DA851; }

/* ---- HEADER ---- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200); height: 70px;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.header__logo { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 700; color: var(--green-700); }
.header__logo-icon { font-size: 1.5rem; }
.header__nav { display: flex; align-items: center; gap: 24px; }
.header__nav a { font-weight: 500; color: var(--gray-700); transition: color var(--transition); }
.header__nav a:hover { color: var(--green-600); }
.header__hamburger {
    display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.header__hamburger span { width: 24px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: var(--transition); }

@media (max-width: 768px) {
    .header__nav { display: none; position: fixed; top: 70px; left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; padding: 40px 20px; gap: 20px; }
    .header__nav.open { display: flex; }
    .header__nav a { font-size: 1.2rem; }
    .header__hamburger { display: flex; }
}

/* ---- STICKY CTA MOBILE ---- */
.sticky-cta {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    padding: 12px 16px; background: var(--white); border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1); gap: 10px; justify-content: center;
}
@media (max-width: 768px) { .sticky-cta { display: flex; } }

/* ---- HERO ---- */
.hero {
    position: relative; padding: 140px 0 80px; overflow: hidden;
    background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 50%, var(--earth) 100%);
    color: var(--white);
}
.hero__bg {
    position: absolute; inset: 0; overflow: hidden;
}
.hero__bg-img {
    width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
}
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(27,94,32,0.85) 0%, rgba(46,125,50,0.75) 50%, rgba(93,64,55,0.8) 100%);
}
.hero__content { position: relative; text-align: center; max-width: 800px; margin: 0 auto; }
.hero__title { font-family: var(--font-display); font-size: 3rem; line-height: 1.2; margin-bottom: 20px; }
.hero__accent { color: var(--beige); }
.hero__subtitle { font-size: 1.2rem; margin-bottom: 36px; opacity: 0.9; line-height: 1.7; }
.hero__ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 50px; }
.hero__stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.hero__stat { text-align: center; }
.hero__stat-number { display: block; font-size: 2rem; font-weight: 700; }
.hero__stat-label { font-size: 0.875rem; opacity: 0.8; }

@media (max-width: 768px) {
    .hero { padding: 120px 0 60px; }
    .hero__title { font-size: 2rem; }
    .hero__stats { gap: 20px; }
    .hero__stat-number { font-size: 1.5rem; }
}

/* ---- SECTIONS ---- */
.section { padding: 80px 0; }
.section__title { font-family: var(--font-display); font-size: 2.2rem; text-align: center; margin-bottom: 10px; color: var(--green-800); }
.section__subtitle { text-align: center; color: var(--gray-700); font-size: 1.1rem; margin-bottom: 50px; }

@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .section__title { font-size: 1.7rem; }
}

/* ---- AUDIENCE ---- */
.audience { background: var(--gray-50); }
.audience__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.audience__card {
    background: var(--white); border-radius: var(--radius-lg); padding: 32px 24px;
    text-align: center; box-shadow: var(--shadow-sm); transition: all var(--transition);
    border: 1px solid var(--gray-200);
}
.audience__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green-100); }
.audience__card-img {
    width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.audience__card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--green-800); }
.audience__card p { font-size: 0.9rem; color: var(--gray-700); }

@media (max-width: 768px) { .audience__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .audience__grid { grid-template-columns: 1fr; } }

/* ---- CTA BAND ---- */
.cta-band { background: var(--green-700); color: var(--white); padding: 24px 0; }
.cta-band--alt { background: var(--earth); }
.cta-band__inner { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; text-align: center; }
.cta-band__inner p { font-size: 1.1rem; }

/* ---- FORMATIONS ---- */
.formations__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.formations__card {
    background: var(--white); border-radius: var(--radius-lg); padding: 32px;
    border: 1px solid var(--gray-200); transition: all var(--transition);
}
.formations__card { padding: 0; overflow: hidden; }
.formations__card:hover { border-color: var(--green-500); box-shadow: var(--shadow-md); }
.formations__card-img {
    width: 100%; height: 200px; object-fit: cover; display: block;
}
.formations__card-body { padding: 24px 28px 28px; }
.formations__card h3 { font-size: 1.2rem; margin-bottom: 16px; color: var(--green-800); }
.formations__card ul { margin-bottom: 16px; }
.formations__card li { padding: 6px 0 6px 20px; position: relative; color: var(--gray-700); font-size: 0.95rem; }
.formations__card li::before { content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; background: var(--green-500); border-radius: 50%; transform: translateY(-50%); }
.formations__card-link { color: var(--green-600); font-weight: 600; font-size: 0.9rem; }
.formations__card-link:hover { color: var(--green-800); }
.formations__cta { text-align: center; margin-top: 40px; }

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

/* ---- FINANCEMENT ---- */
.financement { background: var(--green-50); }
.financement__box {
    display: flex; align-items: center; gap: 60px;
    background: var(--white); border-radius: var(--radius-xl); padding: 50px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--green-100);
}
.financement__content { flex: 1; }
.financement__content h2 { font-family: var(--font-display); font-size: 1.8rem; color: var(--green-800); margin-bottom: 16px; }
.financement__content p { color: var(--gray-700); margin-bottom: 16px; line-height: 1.7; }
.financement__visual { text-align: center; flex-shrink: 0; max-width: 360px; }
.financement__img {
    width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius-lg);
    margin-bottom: 20px;
}
.financement__amount {
    font-size: 3.5rem; font-weight: 700; color: var(--green-600);
    background: var(--green-100); border-radius: var(--radius-xl); padding: 30px 40px;
    line-height: 1;
}
.financement__amount span { font-size: 1.2rem; font-weight: 500; color: var(--gray-500); }
.financement__visual p { margin-top: 12px; font-weight: 600; color: var(--green-800); }

@media (max-width: 768px) {
    .financement__box { flex-direction: column; gap: 30px; padding: 30px; }
    .financement__amount { font-size: 2.5rem; padding: 20px 30px; }
}

/* ---- SIMULATEUR ---- */
.simulateur__box {
    max-width: 600px; margin: 0 auto; background: var(--white);
    border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200); position: relative; overflow: hidden;
}
.simulateur__question { font-size: 1.2rem; font-weight: 600; margin-bottom: 24px; text-align: center; color: var(--green-800); }
.simulateur__options { display: flex; flex-direction: column; gap: 12px; }
.simulateur__option {
    padding: 16px 24px; border: 2px solid var(--gray-200); border-radius: var(--radius-md);
    background: var(--white); font-size: 1rem; font-weight: 500; cursor: pointer;
    transition: all var(--transition); text-align: left; font-family: var(--font);
}
.simulateur__option:hover { border-color: var(--green-500); background: var(--green-50); }
.simulateur__result { text-align: center; padding: 20px 0; }
.simulateur__result-icon { font-size: 4rem; margin-bottom: 16px; }
.simulateur__result h3 { font-size: 1.4rem; margin-bottom: 12px; }
.simulateur__result p { color: var(--gray-700); margin-bottom: 24px; }
.simulateur__progress { height: 4px; background: var(--gray-200); border-radius: 4px; margin-top: 30px; }
.simulateur__progress-bar { height: 100%; background: var(--green-500); border-radius: 4px; transition: width 0.5s ease; width: 0%; }

/* ---- GUIDE / LEAD MAGNET ---- */
.guide { background: var(--beige); }
.guide__box {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}
.guide__badge {
    display: inline-block; background: var(--green-600); color: var(--white);
    padding: 4px 16px; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
    margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em;
}
.guide__img {
    width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius-lg);
    margin-bottom: 20px;
}
.guide__content h2 { font-family: var(--font-display); font-size: 1.7rem; color: var(--green-800); margin-bottom: 16px; }
.guide__content p { color: var(--gray-700); margin-bottom: 20px; line-height: 1.7; }
.guide__list { margin-bottom: 16px; }
.guide__list li { padding: 8px 0 8px 28px; position: relative; color: var(--gray-700); line-height: 1.5; }
.guide__list li::before { content: '\2713'; position: absolute; left: 0; color: var(--green-600); font-weight: 700; font-size: 1.1rem; }
.guide__form {
    background: var(--white); border-radius: var(--radius-lg); padding: 32px;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) { .guide__box { grid-template-columns: 1fr; gap: 30px; } }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--gray-700); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm); font-family: var(--font); font-size: 1rem;
    transition: border-color var(--transition); background: var(--white);
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(67,160,71,0.15); }
.form-group input::placeholder { color: var(--gray-500); }
.form-group--checkbox label { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; color: var(--gray-700); cursor: pointer; }
.form-group--checkbox input { width: auto; margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-radio-group { display: flex; gap: 20px; margin-top: 8px; }
.form-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.95rem; }
.form-radio input { width: auto; }
.form-disclaimer { font-size: 0.8rem; color: var(--gray-500); text-align: center; margin-top: 12px; }

@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

/* ---- CONTACT ---- */
.contact { background: var(--gray-50); }
.contact__box { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start; }
.contact__info h2 { font-family: var(--font-display); font-size: 1.8rem; color: var(--green-800); margin-bottom: 16px; }
.contact__info p { color: var(--gray-700); margin-bottom: 24px; line-height: 1.7; }
.contact__benefits { display: flex; flex-direction: column; gap: 12px; }
.contact__benefit { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--gray-700); }
.contact__benefit span { color: var(--green-600); }
.contact__form {
    background: var(--white); border-radius: var(--radius-lg); padding: 36px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200);
}

@media (max-width: 768px) { .contact__box { grid-template-columns: 1fr; gap: 30px; } }

/* ---- TEMOIGNAGES ---- */
.temoignages__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.temoignages__card {
    background: var(--white); border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.temoignages__stars { color: #F9A825; font-size: 1.1rem; margin-bottom: 12px; }
.temoignages__text { font-size: 0.95rem; color: var(--gray-700); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.temoignages__author { display: flex; align-items: center; gap: 12px; }
.temoignages__avatar {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--green-100);
}
.temoignages__author strong { display: block; color: var(--gray-900); }
.temoignages__author span { font-size: 0.85rem; color: var(--gray-500); }
.temoignages__partners { text-align: center; margin-top: 50px; }
.temoignages__partners > p { font-size: 0.9rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.temoignages__logos { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.partner-badge {
    padding: 10px 24px; background: var(--gray-100); border-radius: var(--radius-md);
    font-weight: 600; color: var(--gray-700); font-size: 0.9rem; border: 1px solid var(--gray-200);
}

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

/* ---- FOOTER ---- */
.footer { background: var(--green-800); color: var(--white); padding: 50px 0 0; }
.footer__inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__brand span:first-child { font-size: 1.5rem; }
.footer__brand p { opacity: 0.7; font-size: 0.9rem; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a { opacity: 0.8; transition: opacity var(--transition); }
.footer__links a:hover { opacity: 1; }
.footer__contact p { opacity: 0.8; margin-bottom: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 16px 0; font-size: 0.85rem; opacity: 0.6; }

@media (max-width: 768px) {
    .footer__inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }
}

/* ---- TOAST ---- */
.toast {
    position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
    background: var(--green-700); color: var(--white); padding: 14px 28px;
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-weight: 500;
    z-index: 200; animation: toastIn 0.3s ease;
}
.toast--error { background: var(--red-500); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- ANIMATIONS ---- */
@media (prefers-reduced-motion: no-preference) {
    .audience__card, .formations__card, .temoignages__card {
        opacity: 0; transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }
    .audience__card:nth-child(2), .formations__card:nth-child(2), .temoignages__card:nth-child(2) { animation-delay: 0.1s; }
    .audience__card:nth-child(3), .formations__card:nth-child(3), .temoignages__card:nth-child(3) { animation-delay: 0.2s; }
    .audience__card:nth-child(4), .formations__card:nth-child(4) { animation-delay: 0.3s; }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
