/* ===================================================
   PLEIN-VENT — Design System v2
   Mood : magazine pro contemporain, esprit Étapes
   =================================================== */

/* --- Variables ----------------------------------- */
:root {
    --blue:        #0A4F8A;   /* bleu signal — institutionnel, ciel net */
    --blue-dark:   #063360;
    --orange:      #F26522;   /* orange chantier — accent vif, énergie */
    --cream:       #F4EFE6;   /* fond crème mat — grain magazine papier */
    --cream-dark:  #EDE8DE;   /* crème foncé — séparateurs, alternate */
    --ink:         #1C1B18;   /* quasi-noir chaud — texte principal */
    --ink-light:   #4A4845;   /* gris encre — texte secondaire */
    --ink-muted:   #8A8680;   /* gris doux — méta, légendes */
    --white:       #FFFFFF;
    --border:      #D9D3C8;   /* bordure crème sombre */
    --container:   1280px;
    --radius:      4px;       /* quasi-plat — esprit imprimé */
    --shadow:      0 2px 20px rgba(10, 79, 138, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
    background-color: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .logo-text, .nav-links a, .section-label, .device-cat, .btn {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 5vw, 4.4rem); font-weight: 900; line-height: 1.05; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.15; margin-bottom: 1.25rem; }
h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.85rem; }
h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.65rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

/* --- Container ----------------------------------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

.section { padding: 120px 0; }

/* --- Section label (overline) ------------------- */
.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 18px;
}

/* --- Buttons ------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    letter-spacing: 0.03em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(10, 79, 138, 0.25);
}

.btn-outline {
    border: 2px solid var(--blue);
    color: var(--blue);
    background: transparent;
}
.btn-outline:hover {
    background: var(--blue);
    color: var(--white);
}

.btn-accent {
    background: var(--orange);
    color: var(--white);
}
.btn-accent:hover {
    background: #d95a1e;
    transform: translateY(-1px);
}

.btn-sm { padding: 9px 18px; font-size: 0.82rem; }

/* --- Header ------------------------------------- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-icon { font-size: 1.3rem; }
.logo-text {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.03em;
}
.logo-text span { color: var(--blue); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav-links li { position: relative; }
.nav-links > li > a {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.01em;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.nav-links > li > a:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: -16px;
    background: var(--white);
    min-width: 210px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}
.dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-chevron { width: 14px; height: 14px; transition: transform 0.25s; flex-shrink: 0; }
.dropdown:hover .nav-chevron { transform: rotate(180deg); }

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li a {
    display: block;
    padding: 9px 18px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
    border-bottom: none;
    transition: background 0.15s, color 0.15s;
}
.dropdown-menu li a:hover {
    background: var(--cream);
    color: var(--blue);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
    padding: 6px;
}

/* --- Hero --------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 5fr 6fr;
    min-height: 88vh;
    align-items: stretch;
    background: var(--cream);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 60px 80px 0;
    max-width: 560px;
    margin-left: auto;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 24px;
}
.hero-tag::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--orange);
    display: inline-block;
}

.hero h1 { color: var(--ink); }

.lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--ink-light);
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-img {
    background-size: cover;
    background-position: center;
    position: relative;
    clip-path: none;
}
.hero-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--cream) 0%, transparent 15%);
}

/* --- Section header ----------------------------- */
.section-header { margin-bottom: 64px; }
.section-header.centered { text-align: center; }
.section-header h2 { max-width: 640px; }
.section-header.centered h2 { max-width: 640px; margin-left: auto; margin-right: auto; }
.section-header > p {
    font-size: 1.05rem;
    color: var(--ink-light);
    max-width: 560px;
    line-height: 1.7;
}
.section-header.centered > p { margin: 0 auto; }

/* --- Device cards ------------------------------- */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.device-card {
    background: var(--white);
    display: flex;
    flex-direction: column;
    transition: background 0.2s;
}
.device-card:hover { background: var(--cream); }

.device-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    filter: saturate(0.95);
    transition: filter 0.3s;
}
.device-card:hover .device-img { filter: saturate(1.05); }

.device-body { padding: 28px 28px 32px; flex: 1; display: flex; flex-direction: column; }

.device-cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 12px;
    display: block;
}

.device-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--ink); }
.device-card p { font-size: 0.95rem; color: var(--ink-light); flex: 1; margin-bottom: 20px; }

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 0.01em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.btn-link:hover { border-bottom-color: var(--blue); }

/* --- Outils section (tool cards) ---------------- */
.tools-section { background: var(--cream-dark); }

.tools-section .devices-grid {
    background: var(--border);
    border: 1px solid var(--border);
}

.tool-card-inner {
    padding: 36px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}
.tool-card-inner i { color: var(--blue); }
.tool-card-inner h3 { margin-bottom: 4px; }
.tool-card-inner p { font-size: 0.95rem; color: var(--ink-light); margin-bottom: 0; }

/* --- Calc section (large 2-col) ----------------- */
.calc-section { overflow: hidden; }

.calc-grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 0;
    background: var(--blue);
    border-radius: 6px;
    overflow: hidden;
}

.calc-text {
    padding: 64px 56px;
    color: rgba(255,255,255,0.9);
}
.calc-text h2 { color: var(--white); margin-bottom: 16px; }
.calc-text p { color: rgba(255,255,255,0.8); font-size: 1.05rem; }
.calc-text ul { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.calc-text li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
}
.calc-text li i { color: var(--orange); flex-shrink: 0; margin-top: 3px; }
.calc-text .btn { margin-top: 36px; background: var(--orange); color: #fff; }
.calc-text .btn:hover { background: #d95a1e; }

.calc-visual { position: relative; min-height: 400px; }
.calc-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Tables ------------------------------------- */
.table-responsive { overflow-x: auto; margin: 2rem 0; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

th, td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border); }

th {
    background: var(--cream);
    color: var(--blue);
    font-family: 'Inter Tight', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

tr:hover td { background: var(--cream); }

/* --- Alerts ------------------------------------- */
.alert {
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border-left: 4px solid var(--blue);
}
.alert.info {
    background: rgba(10, 79, 138, 0.06);
    color: var(--blue-dark);
    border-color: var(--blue);
}

/* --- Cards (utility) ---------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin: 2rem 0;
}
.card { background: var(--white); border-radius: 0; }
.p-3 { padding: 1.5rem; }
.bg-white { background: var(--white); }
.bg-light { background: var(--cream); }
.text-primary { color: var(--blue); }

/* --- Reveal on scroll --------------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-on-scroll.revealed { opacity: 1; transform: translateY(0); }

/* --- Footer ------------------------------------- */
.main-footer {
    background: var(--blue);
    color: rgba(255,255,255,0.75);
    padding: 80px 0 36px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand .logo-text { color: var(--white); font-size: 1.3rem; }
.footer-brand .logo-text span { color: var(--orange); }
.footer-brand p { margin-top: 16px; font-size: 0.88rem; line-height: 1.75; max-width: 260px; }

.footer-links h3, .footer-contact h3 {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 20px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links li a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    transition: color 0.2s;
}
.footer-links li a:hover { color: var(--orange); }

.footer-contact p { font-size: 0.9rem; margin-bottom: 20px; }

.socials { display: flex; gap: 14px; margin-top: 4px; }
.socials a {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: border-color 0.2s, color 0.2s;
}
.socials a:hover { border-color: var(--orange); color: var(--orange); }
.socials a i { width: 15px; height: 15px; }

.footer-bottom {
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Quiz UI ------------------------------------- */
.quiz-container { padding: 80px 0; max-width: 840px; margin: 0 auto; }

.quiz-card {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 52px;
}

.quiz-progress { margin-bottom: 48px; }
.progress-bar {
    height: 3px;
    background: var(--blue);
    margin-bottom: 12px;
    transition: width 0.5s ease;
}
.quiz-progress span {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.question-text {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 36px;
    line-height: 1.2;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.option-card {
    background: var(--cream);
    border: none;
    padding: 28px 20px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.option-card:hover { background: var(--white); }
.option-card.selected { background: var(--blue); color: var(--white); }
.option-card.selected i { color: var(--white); }
.option-card.selected span { color: var(--white); }

.option-card i { color: var(--blue); width: 36px; height: 36px; }
.option-card span { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 1rem; }

.result-card {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 52px;
    text-align: center;
}

.badge {
    display: inline-block;
    background: var(--orange);
    color: var(--white);
    padding: 4px 14px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    text-align: left;
    align-items: center;
    margin-top: 36px;
}

.result-features { margin: 20px 0; }
.result-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.icon-small { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; margin-top: 3px; }

.result-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* --- ROI Calculator ----------------------------- */
.roi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    padding: 80px 0;
}

.roi-form-card, .roi-result-card {
    background: var(--white);
    padding: 48px;
}
.roi-result-card { background: var(--cream); }

.metrics-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); margin: 30px 0; }

.metric-item { background: var(--white); padding: 20px 24px; }
.metric-label {
    display: block;
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 6px;
}
.metric-value { font-family: 'Inter Tight', sans-serif; font-size: 2.2rem; font-weight: 900; color: var(--ink); }
.metric-value.primary { color: var(--blue); }

.impact-bar-bg { height: 8px; background: var(--cream-dark); border-radius: 0; margin: 10px 0; overflow: hidden; }
.impact-bar-fill { height: 100%; width: 0; background: var(--orange); transition: width 1s ease; }

.roi-analysis {
    background: var(--white);
    padding: 20px 24px;
    border-left: 3px solid var(--blue);
    margin-top: 28px;
}

.comp-list { margin-top: 14px; }
.comp-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
}

/* --- Forms -------------------------------------- */
.form-group input, .form-group select, .form-group textarea {
    background: var(--cream);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--ink);
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    border-radius: 0;
    padding: 12px 14px;
    width: 100%;
    color: var(--ink);
}
.form-group label {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 6px;
    display: block;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-bottom-color: var(--blue);
    background: var(--white);
}

/* --- Mobile ------------------------------------- */
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
    .devices-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-content { padding: 60px 0 40px; max-width: 100%; margin: 0; }
    .hero-img { height: 55vw; max-height: 420px; }
    .calc-grid { grid-template-columns: 1fr; }
    .calc-visual { min-height: 300px; position: relative; height: 280px; }
    .result-content { grid-template-columns: 1fr; }
    .roi-grid { grid-template-columns: 1fr; padding: 0; }
    .roi-form-card, .roi-result-card { padding: 32px 24px; }
}

@media (max-width: 768px) {
    .devices-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--cream);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 20px 32px;
        gap: 16px;
        align-items: flex-start;
    }
    .nav-links.active { display: flex; }
    .nav { position: relative; }
    .menu-toggle { display: flex; align-items: center; }
    .quiz-card { padding: 28px 20px; }
    h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
}
