/*
Theme Name: AbricoTech
Theme URI: https://abricotech.com
Author: AbricoTech
Description: Thème vitrine épuré et orienté génération de leads pour AbricoTech. Bilingue FR/EN, sans dépendance externe, sécurisé.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: abricotech
*/

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

:root {
    --orange: #FF6B35;
    --orange-dark: #E5531F;
    --orange-soft: #FFF1EB;
    --ink: #14110F;
    --muted: #6B6560;
    --line: #ECE7E3;
    --bg: #FFFFFF;
    --bg-alt: #FAF8F6;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(20, 17, 15, .04), 0 8px 30px rgba(20, 17, 15, .06);
    --container: 1140px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Footer collant : le contenu pousse le footer en bas même si la page est courte. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body > main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 112px 0; }
.section--alt { background: var(--bg-alt); }
[id] { scroll-margin-top: 92px; }

.eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    max-width: 18ch;
}
.section-head { margin-bottom: 56px; }
.section-head--center { text-align: center; }
.section-head--center .section-title { margin: 0 auto; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 56ch; margin-top: 16px; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

/* ============================== Buttons ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .98rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 53, .28); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-block { width: 100%; }

/* ============================== Nav ============================== */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 24px rgba(20, 17, 15, .04); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav-logo { position: relative; overflow: hidden; border-radius: 8px; }
.nav-logo img { height: 30px; width: auto; display: block; }
/* Reflet qui balaie le logo au chargement (et au survol). */
.nav-logo::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: -160%;
    width: 60%;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .85) 50%, transparent 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: logo-sweep 1.5s var(--ease) .45s 1 both;
}
.nav-logo:hover::after { animation: logo-sweep 1s var(--ease) 0s 1; }
@keyframes logo-sweep { from { left: -160%; } to { left: 160%; } }
@media (prefers-reduced-motion: reduce) { .nav-logo::after { display: none; } }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link { font-weight: 500; color: var(--ink); transition: color .2s var(--ease); }
.nav-link:hover { color: var(--orange); }

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
}
.lang-option { color: var(--muted); padding: 0 2px; }
.lang-option.active { color: var(--orange); }
.lang-divider { color: var(--line); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== Hero ============================== */
.hero { padding: 168px 0 96px; position: relative; }
.hero::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -8%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 107, 53, .10), transparent 70%);
    pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; position: relative; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange-soft);
    color: var(--orange-dark);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero-title { font-size: clamp(2.4rem, 5.2vw, 3.6rem); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; }
.hero-title em { font-style: normal; color: var(--orange); }
.hero-subtitle { color: var(--muted); font-size: 1.14rem; margin: 24px 0 36px; max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-media { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-media video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

.hero-trust { display: flex; gap: 40px; margin-top: 56px; }
.hero-trust .stat-num { font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.hero-trust .stat-label { color: var(--muted); font-size: .9rem; }

/* ============================== About ============================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-text p { color: var(--muted); font-size: 1.08rem; margin-bottom: 20px; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-item {
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 500;
    transition: border-color .2s var(--ease), color .2s var(--ease);
}
.tech-item:hover { border-color: var(--orange); color: var(--orange); }

/* ============================== Services ============================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 32px;
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.service-card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow); }
.service-icon {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--orange-soft);
    margin-bottom: 22px;
}
.service-icon svg { width: 26px; height: 26px; stroke: var(--orange); }
.service-card h3 { font-size: 1.22rem; font-weight: 600; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: .98rem; }

/* ============================== Contact / Leads ============================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: start; }
.contact-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 14px; letter-spacing: -.01em; }
.contact-info p { color: var(--muted); margin-bottom: 28px; }
.contact-list { display: grid; gap: 14px; margin-bottom: 28px; }
.contact-list a { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; }
.contact-list svg { width: 20px; height: 20px; stroke: var(--orange); flex: none; }
.contact-list a:hover { color: var(--orange); }
.calendly { padding: 24px; background: var(--orange-soft); border-radius: var(--radius); }
.calendly h4 { font-size: 1.05rem; margin-bottom: 14px; }

.lead-card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.field { position: relative; margin-bottom: 18px; }
.field input, .field textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--ink);
    background: var(--bg);
    transition: border-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

.form-note { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }
.alert { padding: 14px 18px; border-radius: 12px; font-size: .95rem; margin-bottom: 20px; }
.alert-ok { background: var(--orange-soft); color: var(--orange-dark); }
.alert-err { background: #FDECEC; color: #B42318; }

/* ============================== Blog ============================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.post-card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow); }
.post-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-date { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.post-title { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.post-title a:hover { color: var(--orange); }
.post-excerpt { color: var(--muted); font-size: .96rem; flex: 1; }
.post-more { color: var(--orange); font-weight: 600; font-size: .92rem; margin-top: 4px; }
.pagination { margin-top: 48px; text-align: center; }
.pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; margin: 0 4px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; transition: var(--transition); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--orange); color: #fff; border-color: var(--orange); }

.post-back { display: inline-block; color: var(--muted); font-weight: 500; margin-bottom: 28px; transition: color .2s var(--ease); }
.post-back:hover { color: var(--orange); }
.post-single-title { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 8px 0 24px; }
.post-single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; border: 1px solid var(--line); }
.post-content { color: #2a2520; font-size: 1.08rem; line-height: 1.8; }
.post-content > * { margin-bottom: 1.2em; }
.post-content h2 { font-size: 1.6rem; font-weight: 700; margin-top: 1.4em; letter-spacing: -.01em; }
.post-content h3 { font-size: 1.3rem; font-weight: 600; margin-top: 1.2em; }
.post-content a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }
.post-content img { border-radius: var(--radius); max-width: 100%; height: auto; }
.post-content blockquote { border-left: 3px solid var(--orange); padding-left: 20px; color: var(--muted); font-style: italic; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content code { background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { color: var(--muted); font-weight: 500; }
.post-nav a:hover { color: var(--orange); }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .post-grid { grid-template-columns: 1fr; } }

/* ============================== Footer ============================== */
.footer { background: var(--ink); color: #fff; padding: 44px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer img { height: 30px; width: auto; opacity: .9; filter: brightness(0) invert(1); }
.footer p { color: rgba(255, 255, 255, .55); font-size: .9rem; }

/* ============================== Reveal ============================== */
/* Sans JS, le contenu reste visible (pas de masquage). Le masquage initial
   n'est appliqué que si <html> a la classe .js (ajoutée par main.js). */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ============================== Responsive ============================== */
@media (max-width: 900px) {
    .section { padding: 80px 0; }
    .hero { padding: 132px 0 72px; }
    .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-media { order: -1; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        inset: 76px 0 auto 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        background: #fff;
        padding: 28px 24px;
        border-bottom: 1px solid var(--line);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform .3s var(--ease), opacity .3s var(--ease);
    }
    .nav-links.active { transform: none; opacity: 1; visibility: visible; }
    .services-grid { grid-template-columns: 1fr; }
    .hero-cta .btn { flex: 1; }
    .hero-trust { gap: 28px; }
}
@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .hero { padding: 120px 0 56px; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; flex: none; }
    .service-card { padding: 28px 24px; }
    .lead-card { padding: 26px 20px; }
    .nav-logo img { height: 38px; }
    .hero-trust { gap: 24px; }
}
