/* ============================================================
   Tyremasters — design system 2026
   Thème sombre automobile : typo condensée, accent rouge, CTA forts
   ============================================================ */

:root {
    --bg: #0c0e11;
    --bg-soft: #12151a;
    --surface: #181c22;
    --surface-2: #1f242c;
    --line: rgba(255, 255, 255, .09);
    --text: #eceef1;
    --muted: #9aa3ad;
    --accent: #e63a2e;
    --accent-hover: #ff4a3c;
    --accent-soft: rgba(230, 58, 46, .12);
    --radius: 14px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --header-h: 76px;
    --topbar-h: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.1;
    margin: 0 0 .5em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.45rem; }

.container {
    width: min(1200px, 100% - 2.5rem);
    margin-inline: auto;
}

section { padding: 4.5rem 0; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .85rem 1.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
    text-decoration: none !important;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: rgba(255, 255, 255, .35);
}
.btn-ghost:hover { border-color: #fff; transform: translateY(-2px); }

.btn svg { width: 1.05em; height: 1.05em; }

/* ---------- Barre utilitaire ---------- */
.topbar {
    background: #07080a;
    border-bottom: 1px solid var(--line);
    font-size: .82rem;
    color: var(--muted);
    position: relative;
    z-index: 60;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--topbar-h);
}

.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--text); text-decoration: none; }

.topbar-phones { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.topbar-phones svg { width: .85rem; height: .85rem; vertical-align: -1px; margin-right: .3rem; color: var(--accent-hover); }

.topbar-right { display: flex; align-items: center; gap: 1.2rem; }

/* Sélecteur de langue */
.lang { position: relative; }
.lang > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    user-select: none;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover { color: var(--text); }
.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: .4rem;
    min-width: 9.5rem;
    z-index: 100;
}
.lang-menu a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .7rem;
    border-radius: 7px;
    color: var(--text);
    white-space: nowrap;
}
.lang-menu a:hover { background: var(--accent-soft); text-decoration: none; }

/* ---------- Header / navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 14, 17, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transition: background .2s ease;
}

.site-header.scrolled { background: rgba(7, 8, 10, .95); }

.site-header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand img { height: 44px; display: block; }

.nav-desktop { display: flex; align-items: center; gap: .3rem; }

.nav-desktop > .nav-item { position: relative; }

.nav-desktop a.nav-link,
.nav-desktop span.nav-link {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .85rem;
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    cursor: pointer;
}

.nav-desktop a.nav-link:hover,
.nav-desktop .nav-item:hover > .nav-link {
    color: var(--accent-hover);
    text-decoration: none;
}

.nav-link svg.caret { width: .7rem; height: .7rem; opacity: .6; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: .6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .18s ease;
}

.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-inner {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: .5rem;
    min-width: 14rem;
}

.dropdown-inner a {
    display: block;
    padding: .6rem .9rem;
    border-radius: 8px;
    color: var(--text);
    white-space: nowrap;
}
.dropdown-inner a:hover { background: var(--accent-soft); color: var(--accent-hover); text-decoration: none; }

.header-cta { display: flex; align-items: center; gap: .8rem; }
.header-cta .btn { padding: .6rem 1.3rem; font-size: 1rem; }

/* Burger */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .55rem .65rem;
    cursor: pointer;
    color: var(--text);
}
.nav-toggle svg { width: 1.4rem; height: 1.4rem; display: block; }

/* Menu mobile */
.nav-mobile {
    display: none;
    border-top: 1px solid var(--line);
    background: #0a0c0f;
    padding: 1rem 0 1.4rem;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
    display: block;
    padding: .7rem 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.nav-mobile a:hover { color: var(--accent-hover); text-decoration: none; }
.nav-mobile .sub { padding-left: 1.2rem; font-size: 1.05rem; color: var(--muted); }
.nav-mobile .btn { margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: min(82vh, 720px);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
    transform: scale(1.06);
}
.hero-bg.active { opacity: 1; animation: heroZoom 12s linear forwards; }

@keyframes heroZoom {
    from { transform: scale(1.06); }
    to { transform: scale(1.0); }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(7, 8, 10, .94) 18%, rgba(7, 8, 10, .68) 52%, rgba(7, 8, 10, .25) 100%);
}

.hero .container { position: relative; z-index: 2; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--accent-hover);
    margin-bottom: 1.1rem;
}
.hero-kicker::before {
    content: "";
    width: 2.4rem;
    height: 2px;
    background: var(--accent);
}

.hero h1 { max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent-hover); }

.hero p {
    max-width: 52ch;
    color: var(--muted);
    font-size: 1.08rem;
    margin: 1.2rem 0 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section-head { margin-bottom: 2.8rem; max-width: 60ch; }
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
    font-family: var(--font-display);
    font-size: .98rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--accent-hover);
    margin-bottom: .5rem;
}

.section-head p { color: var(--muted); }

/* Atouts */
.features { background: var(--bg-soft); border-block: 1px solid var(--line); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: transform .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(230, 58, 46, .45); }

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent-hover);
    margin-bottom: 1.1rem;
}
.feature-icon svg { width: 26px; height: 26px; }

.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Cartes services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.service-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    text-decoration: none !important;
    transition: transform .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-5px); border-color: rgba(230, 58, 46, .5); }

.service-card figure {
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.service-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    filter: saturate(.92);
}
.service-card:hover figure img { transform: scale(1.07); }

.service-card-body { padding: 1.3rem 1.5rem 1.5rem; }
.service-card-body h3 { color: var(--text); margin-bottom: .35rem; }
.service-card-body span {
    color: var(--accent-hover);
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.service-card-body span svg { width: .9em; height: .9em; transition: transform .2s ease; }
.service-card:hover .service-card-body span svg { transform: translateX(4px); }

/* Bandeau CTA */
.cta-band {
    background: linear-gradient(120deg, #b32218, var(--accent) 55%, #ff6a4d);
    padding: 3.5rem 0;
}

.cta-band .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-band h2 { margin: 0; color: #fff; max-width: 28ch; }

.cta-band .btn {
    background: #0c0e11;
    color: #fff;
    flex-shrink: 0;
}
.cta-band .btn:hover { background: #000; transform: translateY(-2px); }

/* Marques */
.brands-section { background: var(--bg-soft); border-top: 1px solid var(--line); }

.brand-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2rem 3.5rem;
}

.brand-strip a { display: flex; align-items: center; justify-content: center; padding: .6rem; }
.brand-strip img {
    height: 52px;
    width: auto;
    max-width: 140px;
    filter: grayscale(1) brightness(0) invert(1);
    opacity: .6;
    transition: opacity .25s ease, filter .25s ease, transform .2s ease;
}
.brand-strip.secondary img { height: 40px; max-width: 110px; }
.brand-strip a:hover img { filter: none; opacity: 1; transform: scale(1.06); }

.brands-section h4 { color: var(--muted); letter-spacing: .15em; font-size: 1rem; margin: 2.5rem 0 1.5rem; }
.brands-section h4:first-of-type { margin-top: 0; }

/* ---------- Pages intérieures ---------- */
.page-hero {
    position: relative;
    padding: 5.5rem 0 4rem;
    background: radial-gradient(1100px 420px at 18% -10%, rgba(230, 58, 46, .22), transparent 60%), var(--bg-soft);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.page-hero .breadcrumb {
    display: flex;
    gap: .6rem;
    list-style: none;
    margin: 0 0 .9rem;
    padding: 0;
    font-size: .85rem;
    color: var(--muted);
    flex-wrap: wrap;
}
.page-hero .breadcrumb a { color: var(--muted); }
.page-hero .breadcrumb a:hover { color: var(--text); text-decoration: none; }
.page-hero .breadcrumb li + li::before { content: "/"; margin-right: .6rem; opacity: .4; }
.page-hero .breadcrumb .active { color: var(--accent-hover); }

.page-hero h1 { margin: 0; }

/* Bloc contenu service */
.split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 3rem;
    align-items: center;
}

.split .content :is(p, li) { color: var(--muted); }
.split .content strong { color: var(--text); }

.split figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.split figure img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Garages ---------- */
.garage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.4rem;
}

.garage-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.info-list li { display: flex; gap: .7rem; align-items: baseline; color: var(--muted); }
.info-list svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--accent-hover); transform: translateY(2px); }
.info-list a { color: var(--text); }

.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th, .hours td { padding: .5rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.hours th { color: var(--text); font-weight: 600; width: 38%; }
.hours td { color: var(--muted); }
.hours .closed { color: var(--accent-hover); font-weight: 600; }

.map-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    min-height: 420px;
    height: 100%;
}
.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    display: block;
    filter: grayscale(.2) contrast(1.05);
}

/* ---------- Formulaires ---------- */
.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.2rem;
}

.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }

label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .92rem;
    margin-bottom: .4rem;
    color: var(--text);
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    padding: .8rem 1rem;
    font-family: var(--font-body);
    font-size: .98rem;
    transition: border-color .15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239aa3ad' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem; }

textarea { resize: vertical; }

.alert {
    border-radius: 10px;
    padding: 1rem 1.3rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}
.alert p { margin: 0; }
.alert-success { background: rgba(46, 204, 113, .1); border-color: rgba(46, 204, 113, .4); color: #7ee2a8; }
.alert-danger { background: var(--accent-soft); border-color: rgba(230, 58, 46, .45); color: #ff8a80; }

/* ---------- Footer ---------- */
.site-footer {
    background: #07080a;
    border-top: 1px solid var(--line);
    margin-top: 4rem;
}

.footer-main {
    padding: 4rem 0 3rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 3rem;
}

.footer-main h3 { font-size: 1.15rem; color: var(--text); margin-bottom: 1rem; }
.footer-main, .footer-main p, .footer-main address { color: var(--muted); font-style: normal; font-size: .95rem; }
.footer-main a { color: var(--muted); }
.footer-main a:hover { color: var(--text); }

.footer-logo img { height: 52px; margin-bottom: 1rem; }
.footer-ceva img { max-width: 130px; border-radius: 8px; margin-top: .8rem; }

.footer-bottom { border-top: 1px solid var(--line); padding: 1.2rem 0; font-size: .85rem; color: var(--muted); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Animations d'apparition ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-bg.active { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .features-grid, .services-grid { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-desktop, .header-cta .btn-accent { display: none; }
    .nav-toggle { display: block; }
    .topbar-phones span.sep { display: none; }
    .features-grid, .services-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; }
    .cta-band .container { justify-content: center; text-align: center; }
    section { padding: 3.2rem 0; }
}
