/*
 * asensio.be — feuille de style unique.
 * Une colonne sur téléphone ; au-delà de 760 px de large (container query sur .site),
 * grilles à deux colonnes et menu dans l'en-tête ; trois colonnes au-delà de 960 px.
 */

:root {
    --bg: #FBF7F1; --surface: #FFFFFF; --surface-2: #F1EBE1; --line: #E7DFD3; --line-soft: #EFE8DD;
    --ink: #2A2724; --ink-2: #3B3733; --muted: #5F5953;
    --accent: #196D7A; --accent-hover: #0F4F59; --accent-fill: #196D7A; --accent-fill-hover: #0F4F59; --on-fill: #FFFFFF;
    --accent-soft: #E6F1F2; --accent-ink: #0F4F59;
    --urgent: #B4532A; --urgent-hover: #96431F; --urgent-soft: #FBEBE3; --urgent-title: #7A3417; --urgent-text: #4A2A1C;
    --error-soft: #FBE7E4; --error-ink: #8A2A1B;
    --field: #FFFFFF; --field-line: #CFC6B8; --bar-shadow: rgba(42, 39, 36, .07);
    --font-display: "Winky Rough", Georgia, serif;
    --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    --r-lg: 18px; --r-md: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #151B1C; --surface: #1D2526; --surface-2: #232C2D; --line: #313B3C; --line-soft: #2A3334;
        --ink: #EDE7DD; --ink-2: #D9D2C7; --muted: #A8A197;
        --accent: #6CC0CC; --accent-hover: #93D3DC; --accent-fill: #1C7885; --accent-fill-hover: #23909F; --on-fill: #FFFFFF;
        --accent-soft: #1E3437; --accent-ink: #A6DDE4;
        --urgent: #B4532A; --urgent-hover: #C4613A; --urgent-soft: #33211A; --urgent-title: #F3B89D; --urgent-text: #E9D3C8;
        --error-soft: #3A1F1B; --error-ink: #F4C2B8;
        --field: #1A2122; --field-line: #3E4849; --bar-shadow: rgba(0, 0, 0, .35);
    }
}

@font-face {
    font-family: "Source Sans 3";
    src: url("/fonts/SourceSans3.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "Winky Rough";
    src: url("/fonts/WinkyRough.woff2") format("woff2");
    font-display: swap;
}

/* === Base === */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
p { margin: 0; text-wrap: pretty; }
li, .a { text-wrap: pretty; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
section[id], article[id], details[id] { scroll-margin-top: 120px; }
.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: var(--r-md); background: var(--accent-fill); color: var(--on-fill); font-weight: 600; }
.skip:focus { top: 12px; color: var(--on-fill); }

.site { container: site / inline-size; background: var(--bg); }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* === En-tête === */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; height: 56px; align-self: flex-start; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 33px; }
.brand span { font-family: var(--font-display); font-size: 24px; line-height: 1; }
.menu { display: flex; align-items: center; justify-content: space-between; }
.menu a:not(.btn) { padding: 8px 0 10px; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.menu a:not(.btn):hover { color: var(--accent); }
.menu a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.menu .btn { display: none; }

/* === Boutons et liens === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 1.5px solid transparent; border-radius: var(--r-md); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; }
/* Libellé rogné à la hauteur des majuscules : flex le centre alors exactement sur l'icône,
   quelles que soient les métriques de la police selon le navigateur. */
.btn-t { text-box: trim-both cap alphabetic; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 0 18px; }
.btn-accent { background: var(--accent-fill); color: var(--on-fill); }
.btn-accent:hover { background: var(--accent-fill-hover); color: var(--on-fill); }
.btn-ghost { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn-urgent { background: var(--urgent); color: #FFFFFF; }
.btn-urgent:hover { background: var(--urgent-hover); color: #FFFFFF; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; align-self: flex-start; font-weight: 600; text-decoration: none; }
.link-arrow .ic { width: 18px; height: 18px; }
.btn-pair { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* === Pages === */
main { padding-bottom: 56px; }
.page { display: flex; flex-direction: column; gap: 44px; }
.h-section { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.2; }
.h-card { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.page-head { display: flex; flex-direction: column; gap: 10px; padding-top: 28px; }
.h-page { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.12; }
.lead { font-size: 18px; color: var(--ink-2); }
.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; align-self: flex-start; font-size: 15px; font-weight: 600; text-decoration: none; }
.crumb .ic { width: 18px; height: 18px; }
/* Pas de largeur maximale : sur une colonne, le texte s'aligne sur les autres blocs ;
   sur deux colonnes, la colonne est déjà plus étroite que 68 caractères. */
.prose { display: flex; flex-direction: column; gap: 14px; }
.split { display: grid; gap: 44px; }

/* === Accueil : bandeau === */
.hero-img { width: 100%; height: 150px; object-fit: cover; }
.hero-text { display: flex; flex-direction: column; gap: 16px; }
.who { display: flex; align-items: flex-end; gap: 14px; margin-top: -40px; }
.portrait { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); background: var(--surface); }
.who p { padding-bottom: 4px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.who strong { color: var(--ink); }
/* Titre sur une ligne : il mesure 11,07 fois sa taille de police, on divise la largeur disponible par 11,5. */
.display { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: min(32px, calc((100cqi - 40px) / 11.5)); line-height: 1.12; white-space: nowrap; }
.cta-row { display: flex; flex-direction: column; gap: 10px; }
.cta-row .btn-ghost { display: none; }
.note { font-size: 14px; color: var(--muted); text-align: center; }

/* === Coupure de feu === */
.urgent { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: var(--urgent-soft); }
.urgent-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--urgent); color: #FFFFFF; }
.urgent h2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--urgent-title); }
.urgent p { grid-column: 1 / -1; font-size: 16px; line-height: 1.55; color: var(--urgent-text); }
.urgent .ph { display: block; }
.urgent .ph + .ph { margin-top: 10px; }
.urgent .btn { grid-column: 1 / -1; }

/* === Cartes === */
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.card > .link-arrow, .card > .btn { margin-top: auto; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-link { gap: 12px; text-decoration: none; color: var(--ink); }
.card-link:hover { border-color: var(--accent); color: var(--ink); }
.price { padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price.is-free { background: var(--urgent); color: #FFFFFF; }
.label { margin: 6px 0 0; font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.checks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.5; }
.checks li { display: flex; gap: 10px; }
.checks .ic { width: 18px; height: 18px; margin-top: 3px; stroke-width: 2.4; color: var(--accent); }
.bullets { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; }
.aside { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface-2); }
.aside .sub { font-size: 16px; color: var(--ink-2); }
.aside-row { gap: 12px; padding: 20px; }

/* Domaines (« Pour quoi me consulter ? ») */
.domain { gap: 12px; }
.domain-head { display: flex; align-items: center; gap: 14px; }
.domain .more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; font-weight: 600; color: var(--accent); }
.domain .more .ic { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 14px; line-height: 1.35; color: var(--ink-2); }

/* === Listes de liens === */
.rows { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.rows a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 18px; font-weight: 600; text-decoration: none; color: var(--ink); }
.rows a + a { border-top: 1px solid var(--line-soft); }
.rows a:hover { background: var(--accent-soft); color: var(--ink); }
.rows .ic { color: var(--accent); }

/* === Coordonnées === */
.contacts { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.contacts a { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; text-decoration: none; color: var(--ink); }
.contacts a + a { border-top: 1px solid var(--line-soft); }
.contacts a:hover { background: var(--accent-soft); color: var(--ink); }
.bubble { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.bubble .ic { width: 18px; height: 18px; }
.bubble-lg { width: 48px; height: 48px; }
.bubble-lg .ic { width: 22px; height: 22px; }
.t { display: flex; flex-direction: column; line-height: 1.3; }
.t b { font-weight: 600; white-space: nowrap; }
.t span { font-size: 14px; color: var(--muted); }

/* Contact : tuiles */
.tiles { display: flex; flex-direction: column; gap: 10px; }
.tiles a { display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); }
.tiles a:hover { border-color: var(--accent); color: var(--ink); }
.tiles .ic { width: 22px; height: 22px; color: var(--accent); }
.tiles a.is-primary { border-color: transparent; background: var(--accent-fill); color: var(--on-fill); }
.tiles a.is-primary:hover { background: var(--accent-fill-hover); }
.tiles a.is-primary .ic { color: var(--on-fill); }
.tiles a.is-primary .t span { color: var(--on-fill); opacity: .85; }

/* === Formulaire === */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; font-size: 17px; }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 12px; font-size: 16px; }
.alert ul { margin: 0; padding-left: 20px; }
.alert-ok { background: var(--accent-soft); color: var(--accent-ink); }
.alert-err { background: var(--error-soft); color: var(--error-ink); }

/* === FAQ === */
.faq { display: flex; flex-direction: column; max-width: 820px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.faq details + details { border-top: 1px solid var(--line-soft); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 20px; font-weight: 600; line-height: 1.35; text-wrap: balance; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--accent); transition: transform .2s; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq .a { padding: 0 20px 18px; color: var(--ink-2); }

/* === À propos === */
/* height: auto annule la hauteur des attributs width/height, sinon aspect-ratio est ignoré. */
.photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-lg); }
.media { display: grid; gap: 20px; align-items: center; }
.quote { margin: 4px 0 0; font-family: var(--font-display); font-size: 20px; line-height: 1.35; text-wrap: balance; }
.quote small { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 15px; color: var(--muted); }
.bio { display: grid; gap: 16px; }
.bio-side { display: flex; align-items: center; gap: 16px; }
.bio-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.bio-quote-desk { display: none; }

/* === Pied de page et barre mobile === */
.foot { padding-block: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.foot img { width: 34px; height: 37px; }
.foot a { color: var(--muted); }
.mbar { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); box-shadow: 0 -4px 16px var(--bar-shadow); }
/* Accueil : la barre n'apparaît qu'une fois le bouton WhatsApp du bandeau sorti de l'écran (voir site.js). */
.js .mbar[data-watch]:not(.is-on) { display: none; }

@container site (min-width: 760px) {
    .top-in { flex-direction: row; align-items: center; justify-content: space-between; height: 76px; }
    .brand { height: auto; align-self: center; }
    .brand img { width: 36px; height: 39px; }
    .brand span { font-size: 28px; }
    .menu { gap: 30px; justify-content: flex-end; }
    .menu a:not(.btn) { padding: 6px 0; font-size: 17px; }
    .menu .btn { display: inline-flex; }

    .page { gap: 72px; font-size: 18px; }
    .h-section { font-size: 34px; }
    .h-card { font-size: 22px; }
    .page-head { padding-top: 56px; }
    .h-page { font-size: 48px; }
    .lead { font-size: 20px; }

    .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 56px; width: 100%; max-width: 1120px; margin-inline: auto; padding: 48px 20px 0; }
    .hero-img { order: 2; height: 420px; border-radius: 24px; }
    .hero .hero-text { padding-inline: 0; gap: 22px; }
    .who { align-items: center; margin-top: 0; }
    .portrait { width: 72px; height: 72px; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
    /* colonne de texte = (largeur utile − 96 px) × 1,25 / 2,25 ; divisée par 11,5 */
    .display { font-size: min(52px, calc((min(100cqi, 1120px) - 96px) * 0.0483)); line-height: 1.06; }
    .cta-row { flex-direction: row; flex-wrap: wrap; }
    .cta-row .btn-ghost { display: inline-flex; }
    .note { font-size: 15px; text-align: left; }

    .urgent { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 24px; row-gap: 4px; padding: 28px 32px; }
    .urgent-ic { grid-row: 1 / span 2; width: 52px; height: 52px; }
    .urgent h2 { grid-column: 2; align-self: end; justify-content: flex-start; font-size: 22px; }
    .urgent p { grid-column: 2; align-self: start; font-size: 17px; }
    .urgent .ph + .ph { margin-top: 0; }
    .urgent .btn { grid-column: 3; grid-row: 1 / span 2; }

    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
    .grid-2.equal { align-items: stretch; }
    .card { padding: 28px; }
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }

    .contacts.is-grid { flex-direction: row; flex-wrap: wrap; gap: 16px; overflow: visible; border: 0; border-radius: 0; background: none; }
    .contacts.is-grid a, .contacts.is-grid a + a { flex: 1 1 auto; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
    .contacts.is-grid a:hover { border-color: var(--accent); }

    .media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
    .bio { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; align-items: start; }
    .bio-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 100px); flex-direction: column; align-items: flex-start; gap: 20px; }
    .bio-photo { width: 140px; height: 140px; }
    .bio-quote-desk { display: block; }
    .bio-quote-mob { display: none; }
    .quote { font-size: 22px; }
    .aside-row { padding: 28px 32px; }

    .foot .wrap { flex-direction: row; justify-content: space-between; text-align: left; }
    .mbar { display: none; }
}

@container site (min-width: 960px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
