/* ═══════════════════════════════════════════════════════
   TY LIEN — socle de design partagé
   Variables, base .tl, composants communs (hero badge,
   sections, boutons, CTA, pages légales) + accessibilité.
   Les pages peuvent surcharger via leur <style> inline.
   ═══════════════════════════════════════════════════════ */

:root {
    --g: #00c97b;
    --g2: #00a865;
    --g-soft: rgba(0,201,123,0.08);
    --g-glow: rgba(0,201,123,0.25);
    --dark: #0c0c0c;
    --dark2: #111111;
    --dark3: #1a1a1a;
    --grey1: #2a2a2a;
    --grey2: #888;
    --grey3: #bbb;
    --off: #f5f5f3;
    --white: #fff;
    --r-sm: 14px;
    --r-md: 20px;
    --r-lg: 28px;
    --r-xl: 40px;
    --amber: #f39c12;
    --fb: #1877f2;
    --red: #dc2626;
    --blue: #2563eb;
    --purple: #7c3aed;
    --primary: #00c97b;
    --primary-dark: #00a865;
    --primary-soft: rgba(0, 201, 123, 0.1);
}

.tl * { margin: 0; padding: 0; box-sizing: border-box; }

.tl {
    font-family: 'Sora', sans-serif;
    color: var(--white);
    background: var(--dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.tl a { text-decoration: none; color: inherit; }

.tl img { display: block; }

.tl::before {
    content: '';
    position: fixed; inset: 0; z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
}

@keyframes pop {
    from { opacity: 0; transform: translateY(40px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes blink { 0%,100%{opacity:1}50%{opacity:.3} }

@keyframes drift {
    0%   { transform: scale(1.03) translate(0,0); }
    100% { transform: scale(1.08) translate(-1%,-1%); }
}

@keyframes scrollbar { 0%,100%{opacity:1}50%{opacity:.2} }

.tl-hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(var(--fg-rgb),0.06);
    border: 1px solid rgba(var(--fg-rgb),0.1);
    backdrop-filter: blur(12px);
    padding: 7px 18px 7px 12px;
    border-radius: 100px; margin-bottom: 28px;
    animation: pop .7s cubic-bezier(.34,1.56,.64,1) both;
}

.tl-hero__dot {
    width: 8px; height: 8px; background: var(--g);
    border-radius: 50%; box-shadow: 0 0 10px var(--g);
    animation: blink 2.4s ease-in-out infinite;
}

.tl-hero__badge span {
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2.5px;
    color: rgba(var(--fg-rgb),.65);
}

.tl-hero__scroll {
    position: absolute; bottom: 36px; left: 50%;
    transform: translateX(-50%); z-index: 3;
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    animation: pop .7s .4s cubic-bezier(.34,1.56,.64,1) both;
}

.tl-hero__scroll span {
    font-size: .6rem; text-transform: uppercase;
    letter-spacing: 3px; color: rgba(var(--fg-rgb),.3); font-weight: 600;
}

.tl-hero__scroll-bar {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, rgba(var(--fg-rgb),.35), transparent);
    animation: scrollbar 2s ease-in-out infinite;
}

.tl-divider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.tl-divider__line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--fg-rgb),.07), transparent);
}

.tl-sec-head {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 32px 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.tl-sec-tag {
    font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    color: var(--g);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
}

.tl-sec-tag::before {
    content: ''; width: 28px; height: 2.5px;
    background: var(--g); border-radius: 4px;
}

.tl-sec-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--white);
}

.tl-sec-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .85rem; font-weight: 600;
    color: rgba(var(--fg-rgb),.45);
    padding: 11px 26px;
    border: 1px solid rgba(var(--fg-rgb),.1);
    border-radius: 100px;
    transition: all .3s;
    white-space: nowrap; flex-shrink: 0;
}

.tl-sec-link:hover {
    border-color: var(--g);
    color: var(--g);
    background: rgba(0,201,123,.05);
}

.tl-sec-link svg { transition: transform .25s; }

.tl-sec-link:hover svg { transform: translateX(3px); }

.tl-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 34px; border-radius: 100px;
    font-family: 'Sora', sans-serif;
    font-weight: 600; font-size: .92rem;
    border: none; cursor: pointer;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}

.tl-btn--primary:hover {
    background: var(--g2); transform: translateY(-3px);
    box-shadow: 0 0 40px var(--g-glow), 0 14px 40px rgba(0,201,123,.35);
}

.tl-btn--glass {
    background: rgba(var(--fg-rgb),.07); color: var(--white);
    border: 1px solid rgba(var(--fg-rgb),.12);
    backdrop-filter: blur(10px);
}

.tl-btn--glass:hover {
    background: rgba(var(--fg-rgb),.13);
    border-color: rgba(var(--fg-rgb),.25);
    transform: translateY(-3px);
}

.tl-cta {
    padding: 120px 32px 140px;
    text-align: center;
    position: relative;
}

.tl-cta::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,201,123,.06), transparent 65%);
    pointer-events: none;
}

.tl-cta__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
    color: var(--white);
    max-width: 700px;
    margin: 0 auto 20px;
    position: relative;
}

.tl-cta__sub {
    font-size: 1.05rem;
    font-weight: 300;
    color: rgba(var(--fg-rgb),.4);
    max-width: 460px;
    margin: 0 auto 44px;
    line-height: 1.7;
    position: relative;
}

.tl-cta__btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--g); color: var(--dark);
    font-family: 'Sora', sans-serif;
    font-weight: 700; font-size: .95rem;
    padding: 18px 40px; border-radius: 100px;
    border: none; cursor: pointer;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 0 0 var(--g-glow), 0 8px 32px rgba(0,201,123,.2);
    position: relative;
}

.tl-cta__btn:hover {
    background: var(--g2);
    transform: translateY(-3px);
    box-shadow: 0 0 50px var(--g-glow), 0 14px 40px rgba(0,201,123,.3);
}

.tl-cta__btn svg { transition: transform .25s; }

.tl-cta__btn:hover svg { transform: translateX(3px); }

.tl-legal-hero {
    position: relative;
    padding: 90px 32px 70px;
    text-align: center;
    overflow: hidden;
}

.tl-legal-hero::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--g-glow), transparent 55%);
    opacity: .4; z-index: 0;
}

.tl-legal-hero__wrap { position: relative; z-index: 2; }

.tl-legal-hero__tag {
    font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    color: var(--g); margin-bottom: 16px;
    animation: pop .7s cubic-bezier(.34,1.56,.64,1) both;
}

.tl-legal-hero__h1 {
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 800; letter-spacing: -1.8px;
    line-height: 1.05;
    max-width: 700px; margin: 0 auto;
    animation: pop .7s .1s cubic-bezier(.34,1.56,.64,1) both;
}

.tl-legal {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 110px;
}

.tl-legal__card {
    background: var(--dark3);
    border: 1px solid rgba(var(--fg-rgb),.06);
    border-radius: var(--r-lg);
    padding: 52px 56px;
}

.tl-legal__card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.3px;
    color: var(--white);
    margin: 38px 0 14px;
    padding-top: 6px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.tl-legal__card h3::before {
    content: '';
    width: 18px; height: 2.5px;
    background: var(--g);
    border-radius: 4px;
    flex-shrink: 0;
    align-self: center;
}

.tl-legal__card h3:first-child { margin-top: 0; }

.tl-legal__card p, .tl-legal__card li {
    font-size: .92rem;
    font-weight: 300;
    line-height: 1.85;
    color: rgba(var(--fg-rgb),.55);
}

.tl-legal__card p { margin-bottom: 12px; }

.tl-legal__card ul { padding-left: 22px; margin-bottom: 12px; }

.tl-legal__card li { margin-bottom: 6px; }

.tl-legal__card strong { color: rgba(var(--fg-rgb),.8); font-weight: 600; }

@media (max-width: 640px) {
    .tl-legal-hero { padding: 64px 20px 48px; }
    .tl-legal { padding: 0 16px 80px; }
    .tl-legal__card { padding: 32px 24px; border-radius: 20px; }
}


/* ── Accessibilité & confort ───────────────────────── */
html { scroll-behavior: smooth; }

.tl-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: #00c97b;
    color: var(--dark);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    padding: 12px 22px;
    border-radius: 0 0 14px 0;
}
.tl-skip-link:focus {
    left: 0;
    color: var(--dark);
    text-decoration: none;
}

.tl-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(var(--fg-rgb),.12);
    background: rgba(var(--bg-rgb),.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: rgba(var(--fg-rgb),.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .3s ease;
}
.tl-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.tl-top:hover {
    border-color: #00c97b;
    color: #00c97b;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════
   THÈMES — sombre (défaut) / clair
   Le thème effectif est posé sur <html data-theme="...">
   par le script du header (système par défaut, forçable).
   ═══════════════════════════════════════════════════════ */

:root {
    /* Canaux RGB pour les couleurs translucides */
    --fg-rgb: 255, 255, 255;  /* texte / bordures */
    --bg-rgb: 12, 12, 12;     /* fonds / overlays */
}

html[data-theme="light"] {
    --dark: #f4f3f0;          /* fond de page */
    --dark2: #ebeae6;         /* fond secondaire */
    --dark3: #ffffff;         /* cartes */
    --white: #1a1a1a;         /* texte principal */
    --off: #1a1a1a;
    --grey1: #d8d6d2;
    --grey2: #6b6b6b;
    --grey3: #494949;
    --g: #00945f;             /* vert assombri pour le contraste */
    --g2: #007a4e;
    --g-soft: rgba(0, 148, 95, 0.09);
    --g-glow: rgba(0, 148, 95, 0.16);
    --fg-rgb: 20, 20, 20;
    --bg-rgb: 244, 243, 240;
}

/* Le grain est trop visible sur fond clair */
html[data-theme="light"] .tl::before { opacity: 0.04; filter: invert(1); }

/* Îlots toujours sombres : composants avec photo + overlay,
   où le texte clair doit rester lisible quel que soit le thème. */
html[data-theme="light"] .tl-hero,
html[data-theme="light"] .tl-strip,
html[data-theme="light"] .tl-boutique__strip,
html[data-theme="light"] .tl-acard,
html[data-theme="light"] .tl-actu-hero,
html[data-theme="light"] .tl-actu-back,
html[data-theme="light"] .tl-gitem,
html[data-theme="light"] .tl-card__date,
html[data-theme="light"] .tl-rcard__date,
html[data-theme="light"] .tl-map__tag {
    --dark: #0c0c0c;
    --dark2: #111111;
    --dark3: #1a1a1a;
    --white: #fff;
    --off: #f5f5f3;
    --g: #00c97b;
    --g2: #00a865;
    --g-soft: rgba(0, 201, 123, 0.08);
    --g-glow: rgba(0, 201, 123, 0.25);
    --fg-rgb: 255, 255, 255;
    --bg-rgb: 12, 12, 12;
}

/* Fond de page (remplace le style inline du body) */
body { background-color: var(--dark); }

/* Logos : variante claire sur thème sombre, et inversement */
.logo-light-only { display: none !important; }
html[data-theme="light"] .logo-light-only { display: block !important; }
html[data-theme="light"] .logo-dark-only { display: none !important; }

/* Bouton de thème (navbar publique) */
.tl-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(var(--fg-rgb), .14);
    background: rgba(var(--fg-rgb), .04);
    color: rgba(var(--fg-rgb), .7);
    font-size: .9rem;
    cursor: pointer;
    transition: all .25s ease;
    flex-shrink: 0;
}
.tl-theme-btn:hover {
    border-color: var(--g);
    color: var(--g);
}

/* ═══════════════════════════════════════════════════════
   GLASSMORPHISM GLOBAL
   Orbes d'ambiance derrière tout le contenu + recette
   verre dépoli sur tous les composants « carte » du site.
   Les sélecteurs préfixés `html` priment sur les styles
   inline des pages sans toucher à leurs effets hover.
   ═══════════════════════════════════════════════════════ */

/* Orbes de couleur fixes (matière nécessaire au flou) */
html body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(620px 620px at -4% -6%, rgba(0, 201, 123, .13), transparent 65%),
        radial-gradient(700px 700px at 104% 106%, rgba(59, 130, 246, .09), transparent 65%),
        radial-gradient(520px 520px at 88% -8%, rgba(0, 201, 123, .05), transparent 60%);
}

/* Le fond de page vit sur <body> : le wrapper devient transparent
   pour laisser voir les orbes à travers les panneaux de verre. */
html .tl { background: transparent; }

/* Recette verre dépoli — SANS backdrop-filter sur les cartes.
   Le fond du site étant un dégradé lisse (couleur + orbes), un
   dégradé translucide donne le même rendu qu'un vrai flou pour
   un coût GPU quasi nul. Le vrai blur est réservé aux surfaces
   sous lesquelles le contenu défile (navbar, menus, modales). */
html .tl-info__grid, html .tl-info__bar,
html .tl-faq__item, html .tl-search__input,
html .tl-loc, html .tl-press__item, html .tl-intro__card,
html .tl-legal__card, html .tl-auth__card,
html .tl-cal__box, html .tl-legend__box, html .tl-dech__card,
html .tl-method, html .tl-card, html .tl-rcard, html .tl-file,
html .tl-horaire, html .tl-addr__box, html .tl-access__card,
html .tl-actions__box, html .tl-engage__box, html .tl-years__box,
html .tl-toolbar__box, html .tl-pag__link, html .tl-modal__viewer {
    background: linear-gradient(155deg, rgba(var(--fg-rgb), .085), rgba(var(--fg-rgb), .035));
    border-color: rgba(var(--fg-rgb), .1);
}

/* Footer translucide (rien ne défile derrière : pas besoin de flou) */
html .tl-footer {
    background: rgba(var(--bg-rgb), .5);
}

/* Menus déroulants : du contenu passe derrière → vrai flou justifié */
html .navbar .dropdown-menu {
    background: rgba(var(--bg-rgb), .75);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
}
@supports not (backdrop-filter: blur(1px)) {
    html .navbar .dropdown-menu { background: var(--dark3); }
}
