/* ILYGO — feuille de style du site public.
 *
 * Une seule feuille pour toutes les pages publiques. Avant, chaque template
 * portait ~300 lignes de CSS recopiées : la première retouche de couleur
 * en oubliait la moitié. Bootstrap 5 reste chargé pour la grille, les
 * utilitaires, la modale et le menu repliable ; tout ce qui fait l'identité
 * du site est ici.
 *
 * Palette : le bleu marine du logo porte les titres et les boutons, le
 * turquoise du logo sert d'accent (icônes, sur-titres), l'orange du logo
 * n'apparaît qu'en touche (le point des sur-titres). Le reste est neutre.
 */

:root {
    --ink: #213150;
    --ink-deep: #16223a;
    --ink-soft: #2e4470;
    --accent: #1b9fb4;
    --accent-soft: #e4f4f7;
    --warm: #e8834c;
    --bg: #ffffff;
    --bg-soft: #f5f7fb;
    --bg-tint: #e9f1fa;
    --text: #1f2937;
    --muted: #5b6577;
    --line: #e5e9f0;
    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 10px;
    --shadow-sm: 0 6px 20px rgba(33, 49, 80, 0.06);
    --shadow-md: 0 18px 45px rgba(33, 49, 80, 0.10);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Bootstrap : on aligne ses variables sur la charte plutôt que de
       surcharger chaque composant à coups de !important. */
    --bs-primary: #213150;
    --bs-primary-rgb: 33, 49, 80;
    --bs-link-color: #213150;
    --bs-link-hover-color: #1b9fb4;
    --bs-body-font-family: var(--font);
    --bs-body-color: #1f2937;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.015em;
}

a { color: var(--ink); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--accent); }

/* ─── Typographie de section ─────────────────────────────────────────── */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .9rem;
}

.eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warm);
}

.eyebrow.eyebrow-light { color: #9dd8e2; }

.display-hero {
    font-size: clamp(2.3rem, 4.6vw, 3.9rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.display-hero .muted-line { color: var(--muted); font-weight: 700; }

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.12;
}

.lead-x {
    font-size: 1.12rem;
    line-height: 1.65;
    color: var(--muted);
}

.text-muted-x { color: var(--muted); }

.section { padding: 5.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%); }

@media (max-width: 767.98px) {
    .section { padding: 3.75rem 0; }
}

/* ─── Boutons ────────────────────────────────────────────────────────── */

.btn-ink, .btn-ghost, .btn-light-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.2;
    border: 1.5px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}

.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ink:hover { background: var(--ink-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(33, 49, 80, .22); }

.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(33, 49, 80, .35); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }

.btn-light-x { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light-x:hover { background: var(--bg-tint); color: var(--ink); transform: translateY(-2px); }

.btn-lg-x { padding: 1rem 1.9rem; font-size: 1.05rem; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    color: var(--ink);
}
.link-arrow .bi { transition: transform .2s ease; }
.link-arrow:hover .bi { transform: translateX(4px); }

/* ─── Barre de navigation ────────────────────────────────────────────── */

.site-nav {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(33, 49, 80, .06);
    padding: .7rem 0;
    /* Le bandeau UAT occupe le haut de la fenêtre et monte à
       z-index 2147483000 : sans ce décalage il recouvre la barre de
       navigation — entièrement sur mobile, où il fait 89 px. Il publie sa
       hauteur réelle dans `--ilygo-uat-banner-h` (cf. convention bandeau-uat).
       En production la variable n'existe pas : le repli 0px s'applique. */
    top: var(--ilygo-uat-banner-h, 0px);
}

.site-nav .navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); }
.site-nav .navbar-brand img { height: 38px; width: auto; }
.site-nav .navbar-brand span span { color: var(--ink); }
.site-nav .navbar-brand .brand-light { font-weight: 400; color: var(--muted); }

.site-nav .nav-link {
    color: var(--text);
    font-weight: 500;
    padding: .5rem .85rem !important;
    border-radius: 8px;
}
.site-nav .nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.site-nav .nav-link.active { color: var(--ink); font-weight: 700; }

.site-nav .nav-cta {
    margin-left: .75rem;
    padding: .55rem 1.2rem !important;
    background: var(--ink);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--ink-deep); }

/* Couleur d'accent d'ILYGO Transfer (#1b9fb4) : le bouton se reconnaît comme
   menant à cette app, pas à une action du site vitrine lui-même. */
.site-nav .nav-cta-transfer {
    margin-left: .5rem;
    padding: .55rem 1.2rem !important;
    background: var(--accent-soft);
    color: var(--accent) !important;
    border-radius: 10px;
    font-weight: 600;
}
.site-nav .nav-cta-transfer:hover { background: var(--accent); color: #fff !important; }

@media (max-width: 991.98px) {
    .site-nav .navbar-collapse { padding: .75rem 0 .5rem; }
    .site-nav .nav-cta { margin: .5rem 0 0; display: inline-flex; }
    .site-nav .nav-cta-transfer { margin: .5rem 0 0; display: inline-flex; }
}

/* ─── Hero de l'accueil ──────────────────────────────────────────────── */

.hero {
    position: relative;
    padding: 9.5rem 0 5rem;
    background: var(--bg-tint);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('/static/img/ilygo-hero-background.jpg') center / cover no-repeat;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .88) 45%, rgba(255, 255, 255, .35) 100%);
}

.hero .container { position: relative; }

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.75rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(33, 49, 80, .12);
}

.hero-proof li {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    color: var(--ink);
    font-weight: 500;
}

.hero-proof .bi { color: var(--accent); }

@media (max-width: 767.98px) {
    .hero { padding: 7rem 0 3.5rem; }
    .hero-bg::after { background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 100%); }
}

/* ─── Hero des pages intérieures ─────────────────────────────────────── */

.page-hero {
    padding: 8.5rem 0 4rem;
    background: linear-gradient(180deg, var(--bg-tint) 0%, #fff 100%);
}

.page-hero .breadcrumb { font-size: .85rem; margin-bottom: 1.5rem; }
.page-hero .breadcrumb a { color: var(--muted); }
.page-hero .breadcrumb-item.active { color: var(--ink); font-weight: 600; }

.page-hero-visual {
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
}
.page-hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

.reassurance {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.5rem;
    margin-top: 1.5rem;
    font-size: .9rem;
    color: var(--muted);
}
.reassurance li { display: inline-flex; align-items: center; gap: .45rem; }
.reassurance .bi { color: var(--accent); }

/* ─── Cartes ─────────────────────────────────────────────────────────── */

.card-x {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card-x:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }

a.card-x { color: var(--text); }
a.card-x:hover { color: var(--text); }
a.card-x h3 { color: var(--ink); }

.card-x .card-foot { margin-top: auto; padding-top: 1.25rem; }

.card-x > .pill { align-self: flex-start; }

.icon-tile {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--ink);
    font-size: 1.55rem;
    margin-bottom: 1.25rem;
    flex: 0 0 auto;
}

.icon-tile-lg { width: 96px; height: 96px; font-size: 2.8rem; border-radius: 28px; }

.pill {
    display: inline-block;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    background: rgba(33, 49, 80, .07);
    color: var(--ink);
    margin-bottom: .9rem;
}

.pill-ok { background: rgba(25, 135, 84, .1); color: #146c43; }

/* Nom + description sur deux colonnes alignées. La colonne des noms prend
   la largeur du plus long et ne se coupe pas ; les descriptions partent
   toutes du même fer à gauche. Sous 576 px, on repasse en deux lignes
   plutôt que d'écraser la colonne de gauche. */
.name-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1.25rem;
    row-gap: .55rem;
    margin: 0;
}

.name-grid dt { font-weight: 700; white-space: nowrap; }
.name-grid dd { margin: 0; }

@media (max-width: 575.98px) {
    .name-grid { grid-template-columns: 1fr; row-gap: .15rem; }
    .name-grid dd { margin-bottom: .6rem; }
}

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; color: var(--muted); }
.check-list .bi { color: var(--accent); flex: 0 0 auto; margin-top: .15rem; }

/* Deux voies : sur mesure / produits */
.split-card {
    border-radius: var(--r-lg);
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.split-card.split-ink { background: var(--ink); color: #fff; }
.split-card.split-ink h3, .split-card.split-ink h2 { color: #fff; }
.split-card.split-ink .text-muted-x { color: rgba(255, 255, 255, .78); }
.split-card.split-ink .check-list li { color: rgba(255, 255, 255, .85); }
.split-card.split-ink .check-list .bi { color: #9dd8e2; }
.split-card.split-ink .icon-tile { background: rgba(255, 255, 255, .12); color: #fff; }

.split-card.split-soft { background: var(--bg-soft); border: 1px solid var(--line); }

/* ─── Étapes numérotées ──────────────────────────────────────────────── */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }

.steps li {
    position: relative;
    padding-left: 4rem;
    padding-bottom: 2rem;
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 21px;
    top: 48px;
    bottom: 4px;
    width: 2px;
    background: var(--line);
}

.steps h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.steps p { color: var(--muted); margin: 0; }

/* Variante horizontale (accueil) */
.steps-grid .step-num {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--ink); color: #fff; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}

/* ─── Bande sombre ───────────────────────────────────────────────────── */

.band {
    background: var(--ink);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 3rem;
}

.band h2, .band h3, .band h4 { color: #fff; }
.band .text-muted-x, .band p { color: rgba(255, 255, 255, .8); }
.band .bi-lead { color: #9dd8e2; font-size: 1.6rem; }

@media (max-width: 767.98px) { .band { padding: 2rem 1.5rem; } }

/* ─── Tableau « en bref » ────────────────────────────────────────────── */

.facts { width: 100%; font-size: .92rem; }
.facts th { width: 38%; color: var(--muted); font-weight: 600; white-space: nowrap; padding: .65rem .5rem .65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts td { padding: .65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

.aside-box {
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: var(--r-md);
    padding: 1.75rem;
}

/* ─── Frise (pages IA) ───────────────────────────────────────────────── */

.timeline-x { list-style: none; padding: 0; margin: 0; }
.timeline-x li { position: relative; padding: 0 0 1.75rem 2rem; border-left: 2px solid var(--line); }
.timeline-x li:last-child { padding-bottom: 0; }
.timeline-x li::before {
    content: ''; position: absolute; left: -7px; top: .35rem;
    width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.timeline-x .when { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.timeline-x h3 { font-size: 1.05rem; margin: .25rem 0 .4rem; }
.timeline-x p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ─── Technologies ───────────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    padding: .4rem .85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: .85rem;
    font-weight: 500;
    color: var(--ink);
}

/* ─── Formulaire de contact ──────────────────────────────────────────── */

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2.25rem; box-shadow: var(--shadow-sm); }
.form-control, .form-select { border-radius: var(--r-sm); padding: .7rem .9rem; border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(27, 159, 180, .15); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink); }

/* ─── Modales ────────────────────────────────────────────────────────── */

.modal-content { border: 0; border-radius: var(--r-lg); overflow: hidden; }
.modal-header.modal-ink { background: var(--ink); color: #fff; border: 0; padding: 1.4rem 1.6rem; }
.modal-header.modal-ink .modal-title { color: #fff; font-weight: 700; }
.slot-btn { min-width: 80px; }
.btn-outline-primary.active, .btn-outline-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-outline-primary { color: var(--ink); border-color: var(--ink); }

/* ─── Pied de page ───────────────────────────────────────────────────── */

.site-footer {
    background: var(--ink-deep);
    color: rgba(255, 255, 255, .78);
    padding: 4rem 0 1.5rem;
    font-size: .92rem;
}

.site-footer h5 { color: #fff; font-size: .95rem; margin-bottom: 1rem; letter-spacing: .02em; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer hr { border-color: rgba(255, 255, 255, .12); opacity: 1; margin: 2rem 0 1.25rem; }
.site-footer .footer-brand img { height: 36px; width: auto; }
.site-footer .footer-meta { font-size: .8rem; color: rgba(255, 255, 255, .5); }

/* ─── Apparition au défilement ───────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .card-x:hover, .btn-ink:hover, .btn-ghost:hover, .btn-light-x:hover { transform: none; }
}

/* ─── Divers ─────────────────────────────────────────────────────────── */

/* Marge de défilement des ancres : la barre fixe, plus le bandeau UAT quand
   il est là (sinon l'ancre atterrit derrière la barre). */
[id] { scroll-margin-top: calc(90px + var(--ilygo-uat-banner-h, 0px)); }

.img-rounded { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }

.stat { text-align: left; }
.stat .stat-value { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.stat .stat-label { color: var(--muted); font-size: .9rem; margin-top: .35rem; }

.quote-box {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    font-style: italic;
    color: var(--muted);
}
