/* pro.css — la charte SITE d'Echo Lab, calquée sur le site pro de David (export Genesis
   dip-ai.io) : Georgia pour les titres, Arial pour le texte, teal #009BA0, fonds alternés
   #141414 / #1e1e1e, conteneur 1200 px, header fixe transparent qui se solidifie au scroll,
   hero plein écran, pastilles arrondies pour les liens d'action.
   Utilisée par les pages SITE : home, science, blog, contact. Les outils du lab gardent leur
   propre charte. Sur téléphone, seul le site apparaît dans le menu (liens .app masqués). */

:root {
    --color-primary: #009BA0;
    --color-primary-light: #00D4DB;
    --color-bg-1: #1e1e1e;
    --color-bg-2: #141414;
    --color-bg-3: #191919;
    --color-text: #a5a5a5;
    --color-text-muted: #666666;
    --color-text-light: #e0e0e0;
    --color-border: #333333;
    --color-field-bg: #00000010;

    --font-main: Arial, sans-serif;
    --font-heading: Georgia, serif;

    --size-h1: clamp(2.5em, 5vw, 3em);
    --size-h2: clamp(1.8em, 4.5vw, 2.5em);
    --size-h3: clamp(1.4em, 4vw, 2em);
    --size-h4: clamp(1.1em, 3vw, 1.5em);

    --lh-heading: 1.2;
    --lh-body: 1.6;

    --container-max-width: 1200px;
    --container-padding: 30px;
    --section-spacing: 80px;
    --spacing-base: 10px;

    --header-height: 50px;
    --logo-size: 25px;
    --radius-sm: 4px;
    --image-border-radius: 6px;

    --shadow-medium: 3px 3px 8px #00000080, 3px 3px 15px #00000020;
    --shadow-strong: 3px 3px 10px #00000080, 3px 3px 30px #00000040;
    --transition-speed: 0.2s;
    --hamburger-panel-width: 300px;
}
@media (max-width: 1024px) {
    :root { --container-padding: 60px; --section-spacing: 60px; --header-height: 45px; }
}
@media (max-width: 768px) {
    :root { --container-padding: 24px; --section-spacing: 40px; --header-height: 44px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: hidden; scroll-padding-top: 60px; }
body {
    font-family: var(--font-main); font-size: 16px;
    background: var(--color-bg-1); color: var(--color-text-light);
    line-height: var(--lh-body); min-height: 100vh; overflow-x: hidden;
    display: flex; flex-direction: column;
}
::selection { background: rgba(0, 155, 160, .35); color: var(--color-text-light); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-1); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--color-border) var(--color-bg-1); }

/* L'EN-TÊTE ET LE PIED DE PAGE NE SONT DÉCRITS QU'À UN SEUL ENDROIT : head.css,
   chargé par toutes les pages, site et outils. Rien ici ne doit les redéfinir. */

/* ============================== HERO ============================== */
.hero-section { position: relative; top: 0; height: 100vh; overflow: hidden; }
.hero-section.short { height: 62vh; min-height: 420px; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(rgba(20,20,20,.25), rgba(20,20,20,.55)); }
.hero-content {
    position: absolute; z-index: 10; text-align: center; color: #fff;
    max-width: 800px; padding: 0 20px;
    bottom: 10%; left: 50%; transform: translateX(-50%); width: 95%;
}
.hero-content h1 {
    font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3rem);
    color: #fff; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,.5); line-height: var(--lh-heading);
}
.hero-content p { font-size: 1.2rem; color: #fff; margin-bottom: 30px; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.btn-primary {
    background: var(--color-text-light); color: var(--color-bg-1); border: none; border-radius: 50px;
    padding: 7px 18px; font-weight: 500; cursor: pointer; display: inline-block; text-decoration: none;
    font-family: var(--font-main); transition: all var(--transition-speed) ease;
}
.btn-primary:hover { background: var(--color-primary-light); transform: translateY(-2px); }

/* ============================== SECTIONS ============================== */
main { flex: 1 0 auto; }
.section-standard { padding: var(--section-spacing) 0; position: relative; }
.section-standard.first { padding-top: calc(var(--header-height) + var(--section-spacing)); }
.bg-1 { background: var(--color-bg-1); }
.bg-2 { background: var(--color-bg-2); }
.container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); position: relative; z-index: 1; }
.block-heading {
    font-family: var(--font-heading); color: var(--color-text-light); font-weight: 500;
    font-size: var(--size-h2); line-height: var(--lh-heading); margin: 0 0 30px; text-align: center;
}
.block-heading.left { text-align: left; }
h1.block-heading { font-size: var(--size-h1); }
.block-text { color: var(--color-text); line-height: 1.8; }
.block-text p { margin: 0 0 16px; }
.block-text p:last-child { margin-bottom: 0; }
.block-text strong { font-weight: 700; color: var(--color-text-light); }
.block-text h3 { font-family: var(--font-heading); color: var(--color-text-light); font-size: var(--size-h3); margin: 24px 0 16px; line-height: var(--lh-heading); font-weight: 500; }
.block-text ul { margin: 16px 0; padding-left: 28px; }
.block-text li { margin-bottom: 8px; padding-left: 4px; }
.text-lead { text-align: center; }
.block-text a, .link-badge {
    color: var(--color-primary); text-decoration: none; transition: color var(--transition-speed) ease;
    border: 1px solid var(--color-text-muted); padding: 1px 8px; border-radius: 50px;
    line-height: 1.4; white-space: nowrap; display: inline-block;
}
.block-text a:hover, .link-badge:hover { color: var(--color-primary-light); }
a.plain { border: none; padding: 0; border-radius: 0; white-space: normal; }

/* grille de points — les piliers du projet */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 1024px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } }
.pillar h3 { font-family: var(--font-heading); font-weight: 500; color: var(--color-text-light); font-size: 1.25em; margin-bottom: 10px; }
.pillar h3 a { color: inherit; text-decoration: none; }
.pillar h3 a:hover { color: var(--color-primary-light); }
.pillar p { color: var(--color-text); font-size: .95em; line-height: var(--lh-body); }

/* chiffres vivants */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
.stat b { display: block; font-family: var(--font-heading); font-weight: 500; font-size: clamp(1.6em, 3.5vw, 2.3em); color: var(--color-primary); line-height: 1.1; }
.stat span { color: var(--color-text); font-size: .9em; }

/* image + texte côte à côte */
.textimage { display: flex; gap: 30px; align-items: flex-start; }
.textimage .ti-media { flex: 0 0 calc(58% - 15px); max-width: calc(58% - 15px); }
.textimage .ti-text { flex: 1; color: var(--color-text); line-height: 1.8; }
.textimage .ti-text h3 { font-family: var(--font-heading); font-weight: 500; color: var(--color-text-light); font-size: var(--size-h3); margin-bottom: 14px; line-height: var(--lh-heading); }
.textimage.reverse { flex-direction: row-reverse; }
/* le média garde un format paysage quelle que soit la photo d'origine : une photo verticale
   ne doit pas étirer la section sur trois écrans de haut */
.textimage .ti-media img, .textimage .ti-media video, .textimage .ti-media iframe {
    width: 100%; display: block; border-radius: 10px; box-shadow: var(--shadow-strong); border: 0;
    aspect-ratio: 16 / 10; object-fit: cover;
}
@media (max-width: 820px) {
    .textimage, .textimage.reverse { flex-direction: column; }
    .textimage .ti-media { flex: 0 0 auto; max-width: 100%; width: 100%; }
}

/* les dernières entrées du journal, en vignettes — même grille que le site pro */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
@media (max-width: 1024px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards-grid { grid-template-columns: 1fr; gap: 26px; } }
.card-item { text-align: left; text-decoration: none; color: inherit; display: block; }
.card-item .thumb {
    aspect-ratio: 1 / 1; margin-bottom: 16px; border-radius: var(--image-border-radius);
    overflow: hidden; background: var(--color-bg-2); display: block;
}
.card-item .thumb img, .card-item .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-item .thumb.empty {
    background: repeating-linear-gradient(45deg, #202020 0 10px, #1c1c1c 10px 20px);
    display: flex; align-items: center; justify-content: center;
}
.card-item .thumb-vid {
    background: rgba(20,20,20,.8); border: 1px solid var(--color-border); border-radius: 4px;
    padding: 4px 11px; font-size: .75em; color: var(--color-text); text-transform: uppercase; letter-spacing: 1px;
}
.card-item .card-title { font-family: var(--font-heading); font-weight: 500; color: var(--color-text-light); font-size: 1.05em; line-height: 1.25; margin-bottom: 10px; }
.card-item:hover .card-title { color: var(--color-primary-light); }
.card-item .card-date { font-size: .82em; color: var(--color-text); margin-bottom: 10px; }
.card-item .card-text { color: var(--color-text); font-size: .92em; line-height: var(--lh-body); }
.cards-empty { color: var(--color-text-muted); text-align: center; grid-column: 1 / -1; padding: 30px 0; }

/* citation */
.block-quote { max-width: 760px; margin: 0 auto; text-align: center; padding: 0 var(--container-padding); }
.block-quote .quote-text { font-family: var(--font-heading); font-size: var(--size-h4); color: var(--color-text-light); font-style: italic; line-height: 1.5; }
.block-quote .quote-author { display: block; margin-top: 14px; color: var(--color-text-muted); font-style: normal; font-size: .9em; }

/* ============================== SOMMAIRE (livre) ============================== */
.block-toc .toc-chapters { list-style: none; padding: 0; margin: 0; }
.block-toc .toc-chapter { margin-bottom: 24px; }
.block-toc .toc-chapter > a { color: var(--color-text-light); text-decoration: none; font-weight: 500; font-size: 16px; transition: color .2s; }
.block-toc .toc-chapter > a:hover { color: var(--color-primary); }
.block-toc .toc-subchapters { list-style: none; padding-left: 30px; margin-top: 8px; }
.block-toc .toc-subchapters li { margin-bottom: 8px; }
.block-toc .toc-subchapters a { color: var(--color-text); text-decoration: none; font-size: 14px; transition: color .2s; }
.block-toc .toc-subchapters a:hover { color: var(--color-primary); }
.chapter { max-width: 820px; margin: 0 auto; }
.chapter + .chapter { margin-top: calc(var(--section-spacing) * .9); }
.chapter h2 { font-family: var(--font-heading); font-weight: 500; color: var(--color-text-light); font-size: var(--size-h2); line-height: var(--lh-heading); margin-bottom: 22px; }
.chapter h3 { font-family: var(--font-heading); font-weight: 500; color: var(--color-text-light); font-size: 1.35em; margin: 34px 0 12px; }
.chapter p { color: var(--color-text); line-height: 1.8; margin-bottom: 16px; }
.chapter figure { margin: 26px 0; }
.chapter figure img { width: 100%; border-radius: var(--image-border-radius); box-shadow: var(--shadow-medium); display: block; }
.chapter figcaption { font-size: .8em; color: var(--color-text-muted); margin-top: 8px; }

/* ============================== FOOTER ============================== */
/* la note discrète mobile : le méta-site complet vit sur ordinateur */
.desktop-note { display: none; }
@media (max-width: 820px) {
    .desktop-note {
        display: block; text-align: center; font-size: .8em; color: var(--color-text-muted);
        padding: 10px var(--container-padding); background: var(--color-bg-2);
    }
    .desktop-note a { color: var(--color-text); }
}

/* ============================================================================
   L'ENCART DE FIN — copié du site pro de David (section « Travaillons ensemble ») :
   fond clair qui inverse la page, titre sombre, boutons en pilule. Même promesse,
   même geste : on termine toujours par le contact. (03/08)
   ============================================================================ */
.cta-band { background: var(--color-text); padding: var(--section-spacing) 0; }
.cta-band .block-heading,
.cta-band h2 { color: var(--color-bg-2) !important; }
.cta-band .block-text,
.cta-band .block-text p { color: var(--color-bg-1) !important; }
.cta-buttons { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 40px; }
.cta-btn {
    background: var(--color-bg-1); color: var(--color-text-light); border: 1px solid var(--color-bg-2);
    padding: 15px 36px; font-size: 1.3em; font-weight: 400; border-radius: 50px;
    text-decoration: none; display: inline-block; transition: all .3s ease;
}
.cta-btn:hover { background: var(--color-bg-2); color: #fff; }
.cta-btn.cta-alt { background: transparent; color: var(--color-bg-1); }
.cta-btn.cta-alt:hover { background: var(--color-bg-1); color: var(--color-text-light); }
@media (max-width: 560px) { .cta-btn { font-size: 1.1em; padding: 13px 28px; } }
