:root {
    --orange: #f47c20;
    --orange-dark: #e0691a;
    --green: #1e7a34;
    --dark: #1a1a1a;
    --dark-2: #222327;
    --gray-text: #555;
    --light-gray: #f5f5f7;
    --white: #ffffff;
    --radius: 6px;
    --shadow: 0 10px 30px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    color: #222;
    line-height: 1.6;
    background: var(--white);
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--light-gray); font-size: 13px; border-bottom: 1px solid #e8e8e8; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; flex-wrap: wrap; gap: 8px; }
.topbar-item { color: #444; margin-right: 18px; white-space: nowrap; }
.topbar-item i { color: var(--orange); margin-right: 4px; }
.topbar-right { display: flex; align-items: center; flex-wrap: wrap; }
.topbar-socials a { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: var(--dark); color: #fff; border-radius: 50%; margin-left: 6px; font-size: 12px; }

/* ---------- Header ---------- */
.main-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo-block { display: flex; align-items: center; gap: 12px; }
.logo-block img { height: 55px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-weight: 800; font-size: 22px; color: var(--green); letter-spacing: .5px; }
.logo-baseline { font-size: 10px; color: #666; font-weight: 600; letter-spacing: .3px; max-width: 260px; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav > a { font-weight: 600; font-size: 13.5px; color: #333; padding: 8px 0; position: relative; }
.main-nav > a.active, .main-nav > a:hover { color: var(--orange); }
.main-nav > a.active::after { content:''; position: absolute; left:0; right:0; bottom:-2px; height:2px; background: var(--orange); }

.nav-dropdown { position: relative; }
.nav-dropdown > a { font-weight: 600; font-size: 13.5px; color: #333; display: flex; align-items: center; gap: 6px; }
.nav-dropdown > a.active, .nav-dropdown:hover > a { color: var(--orange); }
.nav-dropdown .dropdown-menu {
    position: absolute; top: 100%; left: 0; background: #fff; min-width: 200px;
    box-shadow: var(--shadow); border-radius: var(--radius); padding: 8px 0;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
    z-index: 50;
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown .dropdown-menu a { display: block; padding: 9px 18px; font-size: 13.5px; color: #333; }
.nav-dropdown .dropdown-menu a:hover { background: var(--light-gray); color: var(--orange); }

.btn-contact { background: var(--orange); color: #fff; font-weight: 600; font-size: 13.5px; padding: 12px 22px; border-radius: 4px; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.btn-contact:hover { background: var(--orange-dark); }
.burger { display: none; background: none; border: none; font-size: 22px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    position: relative; background: var(--dark); color: #fff; overflow: hidden;
    min-height: 560px; display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,.92) 20%, rgba(10,10,10,.35) 70%, transparent 100%); }
.hero-content { position: relative; z-index: 2; max-width: 640px; padding: 60px 20px; }
.hero-tag { display: flex; align-items: center; gap: 12px; font-weight: 600; margin-bottom: 18px; color: #ddd; }
.hero-tag::before { content: ''; width: 40px; height: 3px; background: var(--orange); display: inline-block; }
.hero-content h1 { font-size: 48px; line-height: 1.1; font-weight: 800; margin: 0 0 6px; text-transform: uppercase; }
.hero-content h1 .orange { color: var(--orange); display: block; }
.hero-content p { color: #ccc; font-size: 15px; margin: 18px 0 26px; max-width: 520px; }
.btn-outline { display: inline-flex; align-items: center; gap: 10px; background: var(--green); color: #fff; font-weight: 600; padding: 14px 26px; border-radius: 4px; }
.btn-outline:hover { background: #17612a; }
.hero-arrows { position: absolute; right: 40px; bottom: 40px; display: flex; gap: 10px; z-index: 3; }
.hero-arrows button { width: 42px; height: 42px; border-radius: 4px; border: none; background: var(--green); color: #fff; font-size: 16px; cursor: pointer; }
.hero-arrows button:hover { background: #17612a; }

.hero-side-image {
    position: absolute; right: 90px; top: 50%; width: 320px; height: 420px; z-index: 2;
    transform: translateY(-50%);
}
.hero-side-image::before {
    content: ''; position: absolute; top: -18px; right: -18px; width: 100%; height: 100%;
    border: 3px solid var(--orange); border-radius: var(--radius); z-index: -1;
}
.hero-side-image img {
    width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block;
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
}

/* ---------- Section titles ---------- */
.section { padding: 70px 0; }
.section-title { text-align: left; margin-bottom: 40px; }
.section-title .tag { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); font-weight: 700; font-size: 13px; letter-spacing: 1px; margin-bottom: 10px; }
.section-title .tag::before { content: ''; width: 30px; height: 3px; background: var(--orange); }
.section-title h2 { font-size: 32px; font-weight: 800; margin: 0; color: #1a1a1a; }
.section-title.centered { text-align: center; }
.section-title.centered .tag::before { display: none; }
.section-title.centered { display: flex; flex-direction: column; align-items: center; }

/* ---------- Why choose us ---------- */
.why-section { background: var(--orange); position: relative; padding: 70px 0; overflow: hidden; }
.why-section h2 { color: #fff; font-size: 34px; font-weight: 800; margin: 0 0 34px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; z-index: 2; }
.why-card { background: #fff; border-radius: var(--radius); padding: 30px 26px; position: relative; box-shadow: var(--shadow); }
.why-card .icon { width: 56px; height: 56px; border-radius: 10px; background: var(--light-gray); display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--dark); margin-bottom: 16px; }
.why-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.why-card p { font-size: 14px; color: var(--gray-text); margin: 0; }
.why-card .num { position: absolute; right: 20px; bottom: 14px; font-size: 26px; font-weight: 800; color: #eee; }

/* ---------- Activities ---------- */
.activities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 26px; margin-top: 10px; }
.activity-card img { border-radius: var(--radius); height: 200px; width: 100%; object-fit: cover; margin-bottom: 16px; }
.activity-card h3 { color: var(--orange); font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.activity-card p { font-size: 14px; color: var(--gray-text); }
.realisation-card img { object-fit: contain; background: var(--light-gray); padding: 14px; }
.realisation-category { display:inline-block; background: var(--green); color:#fff; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; padding:4px 10px; border-radius:20px; margin-bottom:10px; }
.realisation-card .btn-green { margin-top: 10px; }

/* ---------- News + magazine layout ---------- */
.news-flex { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.news-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.news-card img { height: 220px; object-fit: cover; width: 100%; }
.news-card .body { padding: 20px; }
.news-card h3 { margin: 0 0 8px; font-size: 18px; }
.news-card .date { color: var(--orange); font-size: 12px; font-weight: 700; margin-bottom: 8px; display:block; }
.magazine-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* ---------- Partners ---------- */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 20px; }
.partner-box { background: var(--light-gray); border-radius: var(--radius); padding: 30px; display: flex; align-items: center; justify-content: center; height: 140px; transition: .2s; }
.partner-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.partner-box img { max-height: 70px; }

/* ---------- Generic page hero (inner pages) ---------- */
.page-hero { background: var(--dark); color: #fff; padding: 70px 0 40px; text-align: center; }
.page-hero h1 { font-size: 36px; font-weight: 800; margin: 0 0 10px; text-transform: uppercase; }
.page-hero .breadcrumb { color: #bbb; font-size: 14px; }
.page-hero .breadcrumb a { color: var(--orange); }

.content-block { padding: 60px 0; }
.content-block h2 { color: var(--green); font-size: 26px; margin-bottom: 16px; }
.content-block p { color: #444; font-size: 15.5px; }

/* ---------- Job offers ---------- */
.job-card { border: 1px solid #eee; border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; background: #fff; box-shadow: var(--shadow); }
.job-card h3 { margin: 0 0 6px; color: var(--dark); }
.job-card .meta { font-size: 13px; color: var(--orange); font-weight: 600; margin-bottom: 10px; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--orange); }
.btn-submit { background: var(--orange); color: #fff; border: none; padding: 14px 30px; font-weight: 600; border-radius: 4px; cursor: pointer; font-size: 14.5px; }
.btn-submit:hover { background: var(--orange-dark); }
.alert-success { background: #e7f6ec; color: #1e7a34; padding: 14px 18px; border-radius: 4px; margin-bottom: 20px; font-weight: 600; }
.alert-error { background: #fdecea; color: #b3261e; padding: 14px 18px; border-radius: 4px; margin-bottom: 20px; font-weight: 600; }
.info-box { background: var(--light-gray); border-radius: var(--radius); padding: 26px; }
.info-box .item { display: flex; gap: 14px; margin-bottom: 18px; }
.info-box .item i { color: var(--orange); font-size: 20px; width: 24px; }

/* ---------- Footer ---------- */
.main-footer { background: var(--dark); color: #cfcfcf; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.4fr 1fr 1fr; gap: 30px; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 16px; margin: 0 0 16px; }
.footer-col p { font-size: 14px; color: #aaa; }
.footer-col a { font-size: 14px; color: #ccc; display: block; margin-bottom: 10px; }
.footer-col a:hover { color: var(--orange); }
.footer-links-grid { display: grid; grid-template-columns: 1fr 1fr; }
.footer-since { color: var(--orange); font-size: 26px; font-weight: 800; font-style: italic; margin-top: 20px; }
.footer-socials a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: #2c2d31; border-radius: 4px; margin-right: 8px; }
.footer-socials a:hover { background: var(--orange); color: #fff; }
.footer-bottom { border-top: 1px solid #2c2d31; text-align: center; padding: 18px 0; font-size: 13px; color: #888; }

.scroll-top {
    position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; background: var(--green);
    color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); z-index: 200;
}

/* ---------- Buttons general ---------- */
.btn-green { background: var(--green); color: #fff; padding: 12px 24px; border-radius: 4px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.btn-green:hover { background: #17612a; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .news-flex, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-side-image { display: none; }
}
@media (max-width: 768px) {
    .burger { display: block; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column;
        align-items: flex-start; padding: 16px 20px; box-shadow: var(--shadow); display: none; gap: 4px;
    }
    .main-nav.open { display: flex; }
    .nav-dropdown { width: 100%; }
    .nav-dropdown .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; padding-left: 10px; }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .btn-contact { display: none; }
    .why-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 34px; }
    .footer-grid { grid-template-columns: 1fr; }
    .topbar-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Animations : images publiées par l'admin (accueil) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .hero-bg { animation: heroZoom 20s ease-in-out infinite alternate; }
    .hero-content { animation: heroFadeUp .8s ease both; }
    .hero-side-image { animation: heroSideIn .9s ease .15s both; }
    .hero-side-image img { animation: heroFloat 4s ease-in-out .9s infinite; }
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroSideIn { from { opacity: 0; transform: translateY(-50%) translateX(50px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* Zoom doux au survol sur les visuels (activités, réalisations, actualité, magazine) */
.activity-card { overflow: hidden; border-radius: var(--radius); }
.activity-card img,
.news-card img,
.magazine-cover img { transition: transform .5s ease; }
.activity-card:hover img,
.news-card:hover img,
.magazine-cover:hover img { transform: scale(1.07); }

/* Logos partenaires : passage du noir & blanc à la couleur */
.partner-box img { filter: grayscale(70%); opacity: .85; transition: filter .35s ease, opacity .35s ease, transform .35s ease; }
.partner-box:hover img { filter: grayscale(0%); opacity: 1; transform: scale(1.06); }

/* Apparition progressive au défilement */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-bg, .hero-content { animation: none; }
}

.why-grid .reveal:nth-child(1) { transition-delay: .05s; }
.why-grid .reveal:nth-child(2) { transition-delay: .15s; }
.why-grid .reveal:nth-child(3) { transition-delay: .25s; }

.activities-grid .reveal:nth-child(1) { transition-delay: .05s; }
.activities-grid .reveal:nth-child(2) { transition-delay: .15s; }
.activities-grid .reveal:nth-child(3) { transition-delay: .25s; }
.activities-grid .reveal:nth-child(4) { transition-delay: .35s; }

.partners-grid .reveal:nth-child(1) { transition-delay: .03s; }
.partners-grid .reveal:nth-child(2) { transition-delay: .09s; }
.partners-grid .reveal:nth-child(3) { transition-delay: .15s; }
.partners-grid .reveal:nth-child(4) { transition-delay: .21s; }
.partners-grid .reveal:nth-child(5) { transition-delay: .27s; }
.partners-grid .reveal:nth-child(6) { transition-delay: .33s; }
