/* ───────────────────────────────────────────────────────────
   YELEEN — page d'accueil publique
   Direction : clair et chaleureux, palette tirée du logo
   (bleu canard, orange, ambre). Aucune dépendance : ni Bootstrap,
   ni police externe.
   Contrastes : texte ≥ 4.5:1 (le bouton orange porte du texte blanc
   sur un orange assombri).
   ─────────────────────────────────────────────────────────── */

:root {
    --c-primary:   #1A7491;   /* bleu canard du logo */
    --c-primary-d: #135870;
    --c-primary-l: #E4F1F5;
    --c-accent:    #C8431B;   /* orange du logo, assombri pour le texte blanc */
    --c-accent-d:  #A93614;
    --c-orange:    #E8512A;   /* décoratif uniquement */
    --c-amber:     #F09420;   /* décoratif uniquement */
    --c-bg:        #FBF8F3;
    --c-fg:        #1B2A33;
    --c-muted:     #F1ECE3;
    --c-muted-fg:  #4A5963;
    --c-border:    #E5DED2;
    --c-dark:      #12262F;

    --radius: 18px;
    --shadow: 0 22px 50px -24px rgba(18, 38, 47, .35);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--c-bg);
    color: var(--c-muted-fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.y-page :where(h1, h2, h3, p, ul, ol, figure) { margin: 0; padding: 0; }
.y-page :where(ul, ol) { list-style: none; }
.y-page :where(h1, h2, h3) { color: var(--c-fg); line-height: 1.15; text-wrap: balance; }
.y-page :where(p) { text-wrap: pretty; }
.y-page img { max-width: 100%; }

.y-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.y-container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* Focus clavier visible partout */
.y-page :is(a, summary):focus-visible {
    outline: 3px solid var(--c-primary);
    outline-offset: 3px;
    border-radius: 8px;
}

.y-skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 200;
    background: var(--c-dark); color: #fff; padding: .6rem 1rem; border-radius: 8px;
    text-decoration: none; transition: top .15s;
}
.y-skip:focus { top: 1rem; }
#contenu:focus { outline: none; }

/* ── Marque ── */
.y-brand {
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: 1.3rem; font-weight: 800; letter-spacing: .08em;
    color: var(--c-primary); text-decoration: none; min-height: 44px;
}
.y-brand img { display: block; width: 40px; height: 40px; object-fit: contain; }
.y-brand--light { color: #fff; }
/* Le logo se perd sur fond sombre : pastille claire */
.y-brand__tile { display: grid; place-items: center; width: 46px; height: 46px; background: #fff; border-radius: 12px; }
.y-brand__tile img { width: 34px; height: 34px; }

/* ── Boutons ── */
.y-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .7rem 1.6rem;
    border-radius: 12px; border: 2px solid transparent;
    font-family: inherit; font-size: .95rem; font-weight: 700; line-height: 1.2; text-align: center;
    text-decoration: none; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.y-btn:active { transform: translateY(1px); }
.y-btn svg { width: 18px; height: 18px; flex: none; }
.y-btn--sm { padding: .55rem 1.15rem; font-size: .9rem; white-space: nowrap; }
.y-short { display: none; }
.y-btn--lg { padding: .95rem 2.2rem; font-size: 1.05rem; }

.y-btn--accent {
    background: var(--c-accent); color: #fff;
    box-shadow: 0 12px 24px -12px rgba(200, 67, 27, .75);
}
.y-btn--accent:hover { background: var(--c-accent-d); transform: translateY(-1px); }

.y-btn--ghost { background: rgba(255, 255, 255, .7); border-color: var(--c-border); color: var(--c-fg); }
.y-btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-d); }

.y-btn--ghost-light { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); color: #fff; }
.y-btn--ghost-light:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }

/* ── Navigation (verre) ── */
.y-nav { position: fixed; inset: 0 0 auto 0; z-index: 100; padding: .75rem 1rem; }
.y-nav__bar {
    width: min(1120px, 100%); margin-inline: auto;
    display: flex; align-items: center; gap: 1rem; justify-content: space-between;
    padding: .5rem .6rem .5rem 1.1rem;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 16px;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 8px 30px -14px rgba(18, 38, 47, .3);
}
.y-nav__links { display: flex; gap: .15rem; margin-left: auto; }
.y-nav__links a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 .85rem;
    color: var(--c-muted-fg); font-weight: 600; font-size: .92rem; text-decoration: none;
    border-radius: 10px; transition: color .2s, background-color .2s;
}
.y-nav__links a:hover { color: var(--c-primary-d); background: var(--c-primary-l); }

/* ── Hero ── */
.y-hero {
    position: relative; overflow: hidden;
    padding: 9.5rem 0 6rem;
    background: linear-gradient(180deg, #F3F8F9 0%, var(--c-bg) 100%);
}
.y-blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.y-blob--a { width: 420px; height: 420px; background: #8CC7D8; opacity: .45; top: -140px; left: -100px; }
.y-blob--b { width: 380px; height: 380px; background: #F7B27A; opacity: .4; bottom: -150px; right: -60px; }

.y-hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }

.y-pill {
    display: inline-block; margin-bottom: 1.25rem; padding: .4rem 1rem;
    background: var(--c-primary-l); color: var(--c-primary-d);
    border: 1px solid rgba(26, 116, 145, .3); border-radius: 999px;
    font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.y-hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.07; letter-spacing: -.02em; margin-bottom: 1.25rem; }
.y-grad {
    background: linear-gradient(90deg, var(--c-primary), var(--c-orange));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.y-lead { font-size: 1.15rem; max-width: 34rem; margin-bottom: 2rem; }
.y-hero__cta { display: flex; gap: .85rem; flex-wrap: wrap; }
.y-hero__note { margin-top: 1.25rem; font-size: .9rem; }
.y-hero__note a { color: var(--c-primary-d); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Visuel : le contrôleur de billets */
.y-hero__visual { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
/* Coque de téléphone : l'écran est recadré (le liseré gris de l'image est masqué) */
.y-device {
    position: relative; width: min(250px, 64%);
    padding: 26px 10px 18px;
    background: linear-gradient(160deg, #263F4B, #0C1B22);
    border-radius: 36px;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, .08),
        0 2px 0 rgba(255, 255, 255, .5),
        0 30px 50px -22px rgba(18, 38, 47, .55);
    animation: y-float 7s ease-in-out infinite;
}
.y-device::before { /* haut-parleur */
    content: ''; position: absolute; top: 10px; left: 50%; width: 46px; height: 5px;
    transform: translateX(-50%); background: rgba(255, 255, 255, .18); border-radius: 3px;
}
.y-device__screen {
    position: relative; overflow: hidden; aspect-ratio: 416 / 819;
    background: #fff; border-radius: 20px;
}
.y-device__screen img {
    position: absolute; display: block; max-width: none;
    width: 110.58%; height: auto; left: -5.29%; top: -2.69%;
}
.y-badges { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.y-badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .6rem .95rem; background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
    box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; color: var(--c-fg);
}
.y-badge svg { width: 20px; height: 20px; color: var(--c-primary); flex: none; }
.y-badge--b svg { color: var(--c-accent); }

@keyframes y-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Points clés ── */
.y-keys { padding: 0 0 1rem; }
.y-keys__list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem;
}
.y-keys__item { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; }
.y-keys__item svg { width: 26px; height: 26px; flex: none; margin-top: .15rem; color: var(--c-primary); }
.y-keys__item strong { display: block; color: var(--c-fg); font-size: 1rem; }
.y-keys__item span { font-size: .9rem; }

/* ── Sections ── */
.y-section { padding: 6rem 0; }
.y-section--tint { background: var(--c-muted); }
.y-section__head { text-align: center; max-width: 42rem; margin: 0 auto 3rem; }
.y-section__head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: .75rem; }
.y-section__head p { font-size: 1.05rem; }
.y-eyebrow {
    display: inline-block; margin-bottom: .75rem; padding: .3rem .85rem;
    background: rgba(232, 81, 42, .12); color: var(--c-accent-d);
    border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

/* Cartes */
.y-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.4rem; }
.y-card {
    background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
    padding: 1.9rem 1.7rem;
    transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.y-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #A9D3DF; }
.y-card__icon {
    display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.15rem;
    background: var(--c-primary-l); color: var(--c-primary); border-radius: 14px;
}
.y-card:nth-child(3n+2) .y-card__icon { background: rgba(232, 81, 42, .12); color: var(--c-accent); }
.y-card:nth-child(3n+3) .y-card__icon { background: rgba(240, 148, 32, .16); color: #9A5B06; }
.y-card__icon svg { width: 26px; height: 26px; }
.y-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .55rem; }
.y-card p { font-size: .95rem; }

.y-cards--club .y-card { background: rgba(255, 255, 255, .85); }

/* Autres services : logo, texte, lien en bas de carte */
.y-cards--svc { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.y-cards--svc .y-card { display: flex; flex-direction: column; align-items: flex-start; padding-inline: 1.4rem; }
.y-card__logo { display: block; width: auto; height: 88px; max-width: 100%; margin-bottom: 1.25rem; object-fit: contain; }
.y-card__logo--wide { height: 64px; margin-block: 12px 2rem; border-radius: 10px; }
.y-card__link {
    margin-top: auto; padding-top: 1.25rem; min-height: 44px;
    color: var(--c-primary-d); font-weight: 700; font-size: .92rem; white-space: nowrap;
    text-decoration: underline; text-underline-offset: 3px;
}
.y-card__link:hover { color: var(--c-accent-d); }

/* Deux colonnes : icône à gauche, texte à droite */
.y-cards--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.y-cards--duo .y-card {
    display: grid; grid-template-columns: 60px minmax(0, 1fr); column-gap: 1.25rem; align-items: start;
    padding: 1.6rem 1.75rem;
}
.y-cards--duo .y-card__icon { grid-row: 1 / span 2; width: 60px; height: 60px; margin: 0; border-radius: 16px; }
.y-cards--duo .y-card__icon svg { width: 28px; height: 28px; }
.y-cards--duo .y-card h3 { align-self: end; margin-bottom: .35rem; }
.y-cards--duo .y-card p { grid-column: 2; }
.y-center { text-align: center; margin-top: 2.75rem; }

/* ── Cas d'usage : bande bleu canard, tuiles de même taille ── */
.y-usage {
    padding: 5rem 0; color: #fff;
    background:
        radial-gradient(700px 320px at 0% 0%, rgba(240, 148, 32, .14), transparent 60%),
        radial-gradient(700px 320px at 100% 100%, rgba(232, 81, 42, .12), transparent 60%),
        linear-gradient(135deg, #0E3F50, #135870);
}
.y-usage .y-section__head { margin-bottom: 2.5rem; }
.y-usage .y-section__head h2 { color: #fff; }
.y-usage .y-section__head p { color: #fff; }
.y-usage__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.y-usage__item {
    display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.4rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius);
    transition: background-color .25s, transform .25s var(--ease);
}
.y-usage__item:hover { background: rgba(255, 255, 255, .17); transform: translateY(-3px); }
.y-usage__icon {
    display: grid; place-items: center; flex: none; width: 52px; height: 52px;
    background: #fff; color: var(--c-primary-d); border-radius: 50%;
}
.y-usage__item:nth-child(3n+2) .y-usage__icon { color: var(--c-accent); }
.y-usage__item:nth-child(3n+3) .y-usage__icon { color: #9A5B06; }
.y-usage__icon svg { width: 26px; height: 26px; }
.y-usage__item h3 { color: #fff; font-size: 1.02rem; font-weight: 700; margin-bottom: .2rem; }
.y-usage__item p { font-size: .9rem; color: #fff; }

/* ── Démo : planche sur papier millimétré, avec cotes ── */
.y-defs { position: absolute; }
.y-bench {
    --paper-major: rgba(232, 81, 42, .22);
    --paper-minor: rgba(232, 81, 42, .09);
    display: grid; grid-template-columns: 3rem minmax(0, 1fr);
    grid-template-areas: ". h" "v demo";
    gap: .6rem; padding: 1.25rem;
    border: 1px solid var(--c-border); border-radius: var(--radius);
    background-color: #FFFDF8;
    background-image:
        linear-gradient(var(--paper-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--paper-major) 1px, transparent 1px),
        linear-gradient(var(--paper-minor) 1px, transparent 1px),
        linear-gradient(90deg, var(--paper-minor) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    box-shadow: var(--shadow);
}
.y-demo {
    grid-area: demo; min-height: 420px; padding: 1.25rem; background: #fff;
    border: 2px solid var(--c-primary); border-radius: 14px;
    box-shadow: 0 0 0 6px rgba(255, 253, 248, .9);
}

/* Cotes : trait fléché + repères d'extrémité */
.y-dim { position: relative; color: var(--c-primary-d); font-size: .8rem; font-weight: 700; }
.y-dim svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.y-dim line { stroke: var(--c-primary-d); stroke-width: 2; }
.y-dim__label {
    position: relative; display: inline-block; padding: .15rem .6rem;
    background: #FFFDF8; border-radius: 6px; white-space: nowrap;
}
.y-dim__label b { font-weight: 800; }

.y-dim--h {
    grid-area: h; height: 28px; display: grid; place-items: center;
    border-inline: 2px solid var(--c-primary-d);
}
.y-dim--v {
    grid-area: v; border-block: 2px solid var(--c-primary-d);
}
/* L'étiquette verticale suit le défilement pour rester visible */
.y-dim--v .y-dim__label {
    position: sticky; top: 42vh; margin-block: 1rem;
    left: 50%; transform: translateX(-50%) rotate(180deg);
    writing-mode: vertical-rl;
}

.y-bench__caption { margin-top: 1.25rem; text-align: center; font-size: .95rem; }
.y-bench__caption code {
    display: inline-block; margin-top: .5rem; padding: .3rem .7rem;
    background: var(--c-dark); color: #D3E3E9; border-radius: 8px;
    font-size: .8rem; overflow-wrap: anywhere;
}

/* ── FAQ ── */
.y-faq { max-width: 46rem; margin-inline: auto; display: grid; gap: .75rem; }
.y-faq details { background: #fff; border: 1px solid var(--c-border); border-radius: 14px; }
.y-faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 56px; padding: .9rem 1.25rem; cursor: pointer;
    font-weight: 700; color: var(--c-fg); list-style: none;
}
.y-faq summary::-webkit-details-marker { display: none; }
.y-faq summary::after {
    content: ''; flex: none; width: 10px; height: 10px;
    border-right: 2px solid var(--c-primary); border-bottom: 2px solid var(--c-primary);
    transform: rotate(45deg); transition: transform .2s var(--ease);
}
.y-faq details[open] summary::after { transform: rotate(-135deg); }
.y-faq details[open] { border-color: #A9D3DF; }
.y-faq__body { padding: 0 1.25rem 1.25rem; }
.y-faq__body a { color: var(--c-primary-d); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.y-faq__body ul { list-style: disc; padding-left: 1.2rem; display: grid; gap: .35rem; }

/* ── CTA final ── */
.y-cta {
    padding: 6rem 0; text-align: center; color: #D3E3E9;
    background:
        radial-gradient(800px 380px at 85% 0%, rgba(26, 116, 145, .65), transparent 60%),
        radial-gradient(600px 300px at 5% 100%, rgba(232, 81, 42, .28), transparent 60%),
        var(--c-dark);
}
.y-cta__inner { max-width: 40rem; }
.y-cta h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; margin-bottom: 1rem; }
.y-cta p { margin-bottom: 2rem; font-size: 1.05rem; }
.y-cta__actions { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }
.y-cta a:focus-visible { outline-color: #8CC7D8; }

/* ── Footer ── */
.y-footer { background: #0C1B22; color: #C4D4DA; padding: 3rem 0; text-align: center; }
.y-footer__inner { display: flex; flex-direction: column; align-items: center; gap: .5rem; font-size: .92rem; }
.y-footer a { color: #8CC7D8; text-decoration: underline; text-underline-offset: 3px; }
.y-footer a:hover { color: #fff; }
.y-footer__legal { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; justify-content: center; margin-top: .75rem; font-size: .85rem; }
.y-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
.y-footer .y-footer__copy { margin-top: .5rem; font-size: .8rem; color: #8DA0A8; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .y-hero__grid { grid-template-columns: 1fr; gap: 3rem; }
    .y-hero { padding-top: 8rem; }
    .y-hero__visual { max-width: 420px; margin-inline: auto; width: 100%; }
}
@media (max-width: 900px) {
    .y-long { display: none; }
    .y-short { display: inline; }
}
@media (max-width: 380px) {
    .y-brand { font-size: 1.05rem; letter-spacing: .04em; gap: .4rem; }
    .y-brand img { width: 32px; height: 32px; }
    .y-nav__bar { gap: .5rem; padding-left: .7rem; }
    .y-btn--sm { padding: .5rem .85rem; }
}
@media (max-width: 900px) {
    /* Petit écran : la cote verticale est retirée pour laisser la place au widget */
    .y-bench {
        grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "demo";
        margin-inline: -1.25rem; padding: .5rem .35rem; gap: .4rem;
        border-inline: 0; border-radius: 0;
    }
    .y-dim--v { display: none; }
    .y-demo { padding: .35rem; overflow-x: hidden; }
}
@media (max-width: 960px) {
    .y-usage__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .y-cards--duo { grid-template-columns: 1fr; }
    .y-cards--duo .y-card { grid-template-columns: 48px minmax(0, 1fr); column-gap: .9rem; padding: 1.25rem 1.1rem; }
    .y-cards--duo .y-card__icon { width: 48px; height: 48px; border-radius: 13px; }
    .y-cards--duo .y-card__icon svg { width: 24px; height: 24px; }
}
@media (max-width: 720px) {
    .y-nav__links { display: none; }
    .y-nav__bar { padding-left: .9rem; }
}
@media (max-width: 640px) {
    .y-dim--h .y-dim__label { white-space: normal; text-align: center; font-size: .72rem; line-height: 1.25; }
    .y-dim--h { height: auto; min-height: 28px; }
    .y-usage__list { grid-template-columns: 1fr; }
    .y-section, .y-cta, .y-usage { padding: 4rem 0; }
    .y-hero { padding-bottom: 4rem; }
    .y-hero__cta .y-btn, .y-cta__actions .y-btn { flex: 1 1 100%; }
}

/* ── Mouvement réduit : état final statique ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .y-device { animation: none; }
    .y-card, .y-btn, .y-usage__item, .y-faq summary::after { transition: none; }
}
