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

:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --accent: #ff6d00;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #1a1a2e;
    --text: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --border: #e0e0e0;
    --radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: 0.3s ease;
    --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bg-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: 0.75rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 0.5em 1em;
    background: var(--primary);
    color: var(--text-white);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ========== HEADER ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.4rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu .current a::after { width: 100%; }

.btn-nav {
    background: var(--primary) !important;
    color: var(--text-white) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--radius) !important;
}

.btn-nav:hover {
    background: var(--primary-dark) !important;
}

.btn-nav::after { display: none !important; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: 0; }
.hamburger::after { bottom: 0; }

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
    color: var(--text-white);
    padding: 5rem 1.5rem;
    text-align: center;
}

.hero h1 { color: var(--text-white); margin-bottom: 1rem; }

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-white);
}

.btn-accent:hover {
    background: #e65100;
    color: var(--text-white);
    transform: translateY(-2px);
}

/* ========== SECTIONS ========== */
.section {
    padding: 4rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-alt { background: var(--bg-alt); }

.section-dark {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
    color: var(--text-white);
}

.section-dark h2, .section-dark h3 { color: var(--text-white); }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* ========== GRID ========== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ========== CARDS ========== */
.card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 { margin-bottom: 0.5rem; }
.card-body p { color: var(--text-light); font-size: 0.95rem; }

/* ========== ABOUT SECTION ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.about-images img {
    border-radius: var(--radius);
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.about-images img:first-child {
    grid-column: 1 / -1;
    height: 250px;
}

/* ========== STATS ========== */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
    padding: 3rem 0;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* ========== TEAM ========== */
.team-grid { text-align: center; }

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

.team-member h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.team-member p { color: var(--text-light); font-size: 0.9rem; }

/* ========== FAQ ========== */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

.faq-item h3 {
    color: var(--bg-dark);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-item p { color: var(--text-light); }

/* ========== CONTACT FORM ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-info-list { list-style: none; }

.contact-info-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

/* ========== BLOG LISTING ========== */
.blog-grid { gap: 2rem; }

.blog-card .card-img { height: 220px; }

.blog-card .card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.blog-card .read-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* ========== ARTICLE ========== */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.article-content h1 {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    margin-top: 2rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }

.article-content figure {
    margin: 2rem 0;
}

.article-content figure img {
    border-radius: var(--radius);
}

.article-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.article-disclaimer {
    background: #fff3e0;
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 3rem 1.5rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-info p {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.footer-info a { color: var(--text-white); opacity: 0.8; }
.footer-info a:hover { opacity: 1; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a:hover { opacity: 1; }

.footer-copy {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.6;
    font-size: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ========== CTA SECTION ========== */
.cta-section {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .site-nav.active { display: block; }

    .nav-menu {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-menu li { width: 100%; }

    .nav-menu a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu a::after { display: none; }

    .about-grid,
    .contact-grid { grid-template-columns: 1fr; }

    .stats { grid-template-columns: 1fr; gap: 1rem; }

    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { justify-content: flex-start; }

    .form-row { grid-template-columns: 1fr; }
}

/* --- remonter.py : tableaux defilants ---------------------------------------
   Herite de WordPress : les articles migres contiennent des <table> larges qui
   debordaient l'ecran sur mobile. Le conteneur defile horizontalement au lieu
   de pousser toute la page. */
.he-table-defilante { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
      margin: 1.2rem 0; }
.he-table-defilante > table { min-width: 32rem; }

/* --- vignettes des cartes de listing --------------------------------------
   Les articles portaient deja leur image ; seul le listing ne la lisait pas. */
.blog-card-img { display:block; aspect-ratio:16/10; overflow:hidden; background:#eee;
  border-radius:8px 8px 0 0; }
.blog-card-img img { width:100%; height:100%; object-fit:cover; display:block; }

/* --- fil d'Ariane -----------------------------------------------------------
   Discret par construction : il sert a s'orienter, pas a attirer l'oeil. */
.he-ariane { max-width: 1180px; margin: 0 auto; padding: .9rem 1.2rem .2rem; }
.he-ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 0; padding: 0; font-size: .85rem; color: #777; }
.he-ariane li + li::before { content: "\203A"; margin-right: .4rem; color: #aaa; }
.he-ariane a { color: #777; text-decoration: none; }
.he-ariane a:hover { color: currentColor; text-decoration: underline; }

/* --- articles lies ----------------------------------------------------------
   Pose par poser_articles_lies.py : trois liens vers des articles proches, en
   fin de lecture. Discret, mais c'est le seul chemin qu'un lecteur arrive par
   un moteur avait vers le reste du site. */
.he-lies { margin: 2.5rem 0 0; padding: 1.2rem 1.4rem; background: #f6f7f6;
  border-left: 3px solid #cfd6cf; border-radius: 6px; }
.he-lies h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.he-lies p { font-size: .9rem; color: #6b6b6b; margin: 0 0 .8rem; }
.he-lies ul { margin: 0; padding-left: 1.1rem; }
.he-lies li { margin: .35rem 0; }
