/* =========================================================
   AM MOTORS — REFONTE 2026
   ========================================================= */

:root {
    --bg: #050505;
    --bg-soft: #0a0a0a;
    --surface: #101010;
    --surface-2: #151515;
    --surface-3: #1a1a1a;
    --text: #f5f5f5;
    --text-soft: #b7b7b7;
    --text-muted: #787878;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --red: #c60000;
    --red-light: #ed1717;
    --header-height: 96px;
    --radius: 24px;
    --radius-small: 14px;
    --shell: 1320px;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::selection,
*::selection {
    background: var(--red);
    color: white;
}

img {
    max-width: 100%;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
}

.section-shell {
    width: min(var(--shell), calc(100% - 80px));
    margin-inline: auto;
}

.eyebrow {
    margin-bottom: 20px;
    color: var(--red-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.2;
    text-transform: uppercase;
}

.section-title {
    max-width: 820px;
    color: white;
    font-size: clamp(42px, 5vw, 76px);
    font-weight: 300;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.section-title-small {
    font-size: clamp(36px, 4vw, 60px);
}

.section-intro {
    max-width: 720px;
    margin-top: 30px;
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.8;
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

/* =========================================================
   BOUTONS / LIENS
   ========================================================= */

.btn {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--red);
    color: white;
}

.btn-primary:hover {
    background: var(--red-light);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(0, 0, 0, 0.24);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.08);
}

.text-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 34px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.34);
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.text-link span {
    transition: transform 0.25s ease;
}

.text-link:hover {
    color: var(--red-light);
    border-color: var(--red-light);
}

.text-link:hover span {
    transform: translateX(3px);
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46));
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(var(--shell), calc(100% - 80px));
    height: 100%;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 46px;
}

.header-brand,
.div1-3 {
    flex: 0 0 180px;
}

.header-brand a {
    display: inline-flex;
    align-items: center;
}

.logo {
    width: 168px;
    display: block;
}

.header-nav,
.div2-3 {
    flex: 1;
    margin: 0;
}

.header-nav nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(18px, 2vw, 36px);
}

.header-nav nav li {
    position: relative;
}

.header-nav nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.09em;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.header-nav nav > ul > li > a:first-child::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0;
    height: 1px;
    background: var(--red-light);
    transition: width 0.3s ease;
}

.header-nav nav > ul > li:hover > a:first-child,
.header-nav nav a:hover {
    color: white;
}

.header-nav nav > ul > li:hover > a:first-child::after {
    width: 100%;
}

.dropdown {
    display: flex;
    align-items: center;
}

.sub-btn {
    position: absolute !important;
    top: calc(100% + 8px);
    left: 50%;
    min-width: 150px;
    min-height: 44px !important;
    padding: 0 18px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(12, 12, 12, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown:hover .sub-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 12px 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    transition: transform 0.3s ease;
}

.burger span + span {
    margin-top: 8px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero,
.carousel {
    position: relative;
    height: 100svh;
    min-height: 700px;
    overflow: hidden;carousel
}

.slides {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1.06);
    filter: saturate(0.92);
    transition: opacity 0.9s ease, transform 5.5s ease;
}

.slide.active {
    z-index: 1;
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.53) 45%, rgba(0, 0, 0, 0.14) 78%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 4;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: var(--header-height);
}

.hero-content .eyebrow {
    margin-bottom: 24px;
}

.carousel-text {
    max-width: 920px;
    color: white;
    font-size: clamp(58px, 7.4vw, 118px);
    font-weight: 300;
    letter-spacing: -0.055em;
    line-height: 0.88;
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.hero-lead {
    max-width: 590px;
    margin-top: 34px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.dot {
    position: relative;
    width: 8px;
    height: 8px;
    margin: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

.dot.active {
    width: 48px;
    height: 8px;
    background: rgba(255, 255, 255, 0.22);
}

.progress {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: white;
}

.dot.active .progress {
    animation: loading 5s linear forwards;
}

@keyframes loading {
    from { width: 0; }
    to { width: 100%; }
}

.scroll-indicator {
    position: absolute;
    right: 40px;
    bottom: 30px;
    z-index: 6;
    width: 42px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
}

.scroll-indicator span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: white;
    animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% { transform: translateY(-7px); opacity: 0.35; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* =========================================================
   SERVICES
   ========================================================= */

.split-height {
    opacity: 1;
}

.service-section {
    position: relative;
    padding: 140px 0;
    background: var(--bg);
}

.service-section-alt {
    background: var(--bg-soft);
}

.service-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
    gap: clamp(70px, 8vw, 130px);
    align-items: center;
}

.service-grid-reverse .service-copy {
    order: 2;
}

.service-grid-reverse .service-media {
    order: 1;
}

.service-copy {
    min-width: 0;
}

.service-list {
    margin-top: 46px;
    border-top: 1px solid var(--line);
}

.service-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 22px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.service-number {
    padding-top: 3px;
    color: var(--red-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.service-item h3,
.feature-block h3 {
    color: white;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.service-item p,
.service-item li,
.feature-block li {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.75;
}

.service-item h3 + p,
.service-item h3 + ul {
    margin-top: 9px;
}

.service-item li,
.feature-block li {
    position: relative;
    padding-left: 18px;
}

.service-item li::before,
.feature-block li::before {
    content: '';
    position: absolute;
    top: 0.76em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--red);
}

.service-item li + li,
.feature-block li + li {
    margin-top: 8px;
}

.service-media {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.service-media::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: inherit;
    pointer-events: none;
}

.service-media img {
    width: 100%;
    height: 100%;
    min-height: 660px;
    display: block;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.service-media:hover img {
    transform: scale(1.035);
}

.feature-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 42px;
}

.feature-block {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--surface);
}

.feature-block ul {
    margin-top: 17px;
}

.btn_simu {
    width: auto;
    margin-top: 34px;
}

/* =========================================================
   REALISATIONS
   ========================================================= */

.work-section {
    background: var(--bg);
}

.atelier-banner {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: #0a0a0a;
}

.atelier-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 48%;
}

.atelier-banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 4, 4, 0.97) 0%, rgba(4, 4, 4, 0.88) 25%, rgba(4, 4, 4, 0.62) 48%, rgba(4, 4, 4, 0.18) 76%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.28));
}

.atelier-banner-content {
    position: relative;
    z-index: 2;
    min-height: 610px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.atelier-banner-content h2 {
    max-width: 720px;
    color: white;
    font-size: clamp(54px, 6vw, 92px);
    font-weight: 300;
    letter-spacing: -0.05em;
    line-height: 0.93;
}

.atelier-banner-content > p:not(.eyebrow) {
    max-width: 620px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 17px;
    line-height: 1.7;
}

.instagram-section {
    padding-top: 120px;
    padding-bottom: 140px;
}

.am-instagram-widget {
    width: 100%;
    height: auto;
    margin-top: 55px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}


/* =========================================================
   PARTENAIRES
   ========================================================= */

.partners-section {
    padding: 140px 0;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.partners-heading {
    margin-bottom: 60px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.partner-card {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-6px);
    border-color: rgba(198, 0, 0, 0.55);
    background: var(--surface-2);
}

.partner-logo-wrap {
    height: 210px;
    display: grid;
    place-items: center;
    padding: 42px;
    border-bottom: 1px solid var(--line);
    background: #0d0d0d;
}

.partner-logo-wrap a {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.partner-logo {
    width: auto;
    max-width: 72%;
    max-height: 105px;
    object-fit: contain;
}

.partner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.partner-tag {
    min-height: 46px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.07em;
    line-height: 1.55;
    text-transform: uppercase;
}

.partner-content h3 {
    margin: 20px 0 18px;
    color: white;
    font-size: 25px;
    font-weight: 400;
}

.partner-content address,
.partner-content > a {
    color: var(--text-soft);
    font-size: 14px;
    font-style: normal;
    line-height: 1.7;
}

.partner-content address {
    margin-bottom: 18px;
}

.partner-content > a {
    width: fit-content;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.partner-content > a:hover {
    color: white;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
    padding: 150px 0;
    border-top: 1px solid var(--line);
    background:
        radial-gradient(circle at 18% 28%, rgba(198, 0, 0, 0.12), transparent 28%),
        var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
    gap: clamp(60px, 8vw, 130px);
    align-items: start;
}

.contact-lead {
    max-width: 590px;
    margin-top: 30px;
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.75;
}

.contact-details {
    margin-top: 54px;
    border-top: 1px solid var(--line);
}

.contact-detail {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 26px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.contact-label {
    color: var(--text-muted) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em;
}

.contact-detail p,
.contact-detail a {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.7;
}

.contact-detail-links > :not(.contact-label) {
    width: fit-content;
    display: block;
}

.contact-detail-links a:hover {
    color: white;
}

.instagram-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.instagram-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 18px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.instagram-link:hover .instagram-icon {
    border-color: var(--red);
    background: var(--red);
}

.contact-form-card {
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(18, 18, 18, 0.88);
    box-shadow: var(--shadow);
}

.form-heading {
    margin-bottom: 38px;
}

.form-heading h2 {
    color: white;
    font-size: clamp(32px, 3vw, 46px);
    font-weight: 300;
    line-height: 1;
}

.contact-form {
    padding: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    position: static;
    display: block;
    width: auto;
    margin: 0 0 8px;
    padding: 0;
    transform: none;
    background: transparent;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 500;
}

.form-group label.active {
    transform: none;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    margin: 0;
    padding: 14px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    outline: none;
    background: #0b0b0b;
    color: white;
    font-size: 14px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-group input,
.form-group select {
    height: 52px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #777 50%),
        linear-gradient(135deg, #777 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 22px,
        calc(100% - 13px) 22px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(198, 0, 0, 0.9);
    background: #101010;
    box-shadow: 0 0 0 3px rgba(198, 0, 0, 0.12);
}

.form-submit {
    width: 100%;
    margin-top: 6px;
    border: 0;
}

/* =========================================================
   FORMULAIRE DE CONTACT — ÉTATS D'ENVOI
   ========================================================= */

.form-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.form-status {
    min-height: 22px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.form-status:empty {
    min-height: 0;
    margin-top: 0;
}

.form-status.is-loading {
    color: var(--text-muted, #aaa);
}

.form-status.is-success {
    color: #8ed69d;
}

.form-status.is-error {
    color: #ff7d7d;
}


/* =========================================================
   COOKIE
   ========================================================= */

.cookie-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: none;
    max-width: 760px;
    margin-left: auto;
    padding: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(13, 13, 13, 0.96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cookie-content p {
    color: var(--text-soft);
    font-size: 13px;
}

.cookie-actions {
    display: flex;
    gap: 8px;
}

.cookie-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.cookie-btn.accept {
    background: var(--red);
    color: white;
}

.cookie-btn.refuse {
    border-color: var(--line-strong);
    background: transparent;
    color: white;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 70px 0 34px;
    border-top: 1px solid var(--line);
    background: #020202;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
}

.footer-logo {
    width: 150px;
    display: block;
}

.footer-brand p {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 30px;
    align-content: start;
}

.footer-nav a {
    width: fit-content;
    color: var(--text-soft);
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-legal a:hover {
    color: white;
}

.footer-legal {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 11px;
}

.footer-legal > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 20px;
}

.footer-legal a {
    transition: color 0.2s ease;
}

/* =========================================================
   RESPONSIVE — 1180 PX
   ========================================================= */

@media (max-width: 1180px) {
    :root {
        --header-height: 84px;
    }

    .section-shell {
        width: min(var(--shell), calc(100% - 54px));
    }

    .header-inner {
        width: min(var(--shell), calc(100% - 54px));
        gap: 28px;
    }

    .header-brand,
    .div1-3 {
        flex-basis: 145px;
    }

    .logo {
        width: 140px;
    }

    .header-nav nav ul {
        gap: 17px;
    }

    .header-nav nav a {
        font-size: 10px;
    }

    .service-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
        gap: 60px;
    }

    .service-media,
    .service-media img {
        min-height: 560px;
    }

    .contact-grid {
        grid-template-columns: minmax(0, 0.85fr) minmax(470px, 1.15fr);
        gap: 60px;
    }
}

/* =========================================================
   RESPONSIVE — 900 PX
   ========================================================= */

@media (max-width: 900px) {
    :root {
        --header-height: 78px;
    }

    .section-shell {
        width: calc(100% - 40px);
    }

    .site-header {
        height: var(--header-height);
    }

    .header-inner {
        width: calc(100% - 40px);
        justify-content: space-between;
    }

    .header-brand,
    .div1-3 {
        flex: 0 0 auto;
    }

    .logo {
        width: 132px;
    }

    .burger {
        display: block;
        position: relative;
        top: auto;
        right: auto;
        z-index: 1101;
    }

    .burger.active span:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

    .burger.active span:nth-child(2) {
        transform: translateY(-5px) rotate(-45deg);
    }

    .header-nav,
    .div2-3 {
        position: fixed;
        inset: var(--header-height) 0 auto 0;
        width: 100%;
        max-height: calc(100svh - var(--header-height));
        display: none;
        overflow-y: auto;
        border-top: 1px solid var(--line);
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
    }

    .header-nav.active,
    .div2-3.active {
        display: block;
    }

    .header-nav nav {
        padding: 20px;
    }

    .header-nav nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .header-nav nav li {
        width: 100%;
        border-bottom: 1px solid var(--line);
    }

    .header-nav nav a {
        width: 100%;
        min-height: 58px;
        justify-content: space-between;
        font-size: 13px;
    }

    .dropdown {
        display: block;
    }

    .sub-btn {
        position: static !important;
        min-width: 0;
        min-height: 44px !important;
        padding: 0;
        justify-content: flex-start !important;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--text-muted) !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .dropdown:hover .sub-btn {
        transform: none;
    }

    .hero,
    .carousel {
        min-height: 660px;
    }

    .carousel-text {
        font-size: clamp(52px, 10vw, 84px);
    }

    .scroll-indicator {
        display: none;
    }

    .service-section {
        padding: 100px 0;
    }

    .service-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .service-grid-reverse .service-copy,
    .service-grid-reverse .service-media {
        order: initial;
    }

    .service-media {
        order: -1;
        min-height: 520px;
    }

    .service-media img {
        min-height: 520px;
    }

    .service-grid-reverse .service-media {
        order: -1;
    }

    .feature-columns {
        grid-template-columns: 1fr;
    }

    .atelier-banner,
    .atelier-banner-content {
        min-height: 540px;
    }

    .atelier-banner-image {
        object-position: 62% center;
    }

    .atelier-banner-overlay {
        background:
            linear-gradient(90deg, rgba(4, 4, 4, 0.94) 0%, rgba(4, 4, 4, 0.79) 46%, rgba(4, 4, 4, 0.30) 82%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.4));
    }

    .instagram-section,
    .partners-section,
    .contact-section {
        padding-top: 100px;
        padding-bottom: 100px;
    }

    .partners-grid {
        grid-template-columns: 1fr 1fr;
    }

    .partner-card:last-child {
        grid-column: 1 / -1;
        min-height: 0;
    }

    .contact-grid {
        gap: 70px;
    }
}

/* =========================================================
   RESPONSIVE — 640 PX
   ========================================================= */

@media (max-width: 640px) {
    :root {
        --header-height: 72px;
        --radius: 18px;
    }

    .section-shell {
        width: calc(100% - 30px);
    }

    .header-inner {
        width: calc(100% - 30px);
    }

    .eyebrow {
        margin-bottom: 16px;
        font-size: 10px;
    }

    .section-title {
        font-size: clamp(38px, 12vw, 54px);
    }

    .section-intro,
    .contact-lead,
    .atelier-banner-content > p:not(.eyebrow) {
        font-size: 15px;
    }

    .desktop-only {
        display: none;
    }

    .hero,
    .carousel {
        min-height: 620px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 100px;
    }

    .carousel-text {
        font-size: clamp(42px, 12vw, 56px);
        line-height: 0.94;
    }

    .hero-lead {
        margin-top: 24px;
        font-size: 15px;
    }

    .hero-actions {
        width: 100%;
        margin-top: 26px;
    }

    .hero-actions .btn {
        flex: 1;
        min-width: 150px;
        padding-inline: 18px;
        font-size: 12px;
    }

    .dots {
        bottom: 26px;
    }

    .service-section {
        padding: 78px 0;
    }

    .service-grid {
        gap: 45px;
    }

    .service-media,
    .service-media img {
        min-height: 390px;
    }

    .service-item {
        grid-template-columns: 38px 1fr;
        gap: 14px;
        padding: 23px 0;
    }

    .service-item h3,
    .feature-block h3 {
        font-size: 16px;
    }

    .service-item p,
    .service-item li,
    .feature-block li {
        font-size: 13px;
    }

    .feature-block {
        padding: 22px;
    }

    .atelier-banner,
    .atelier-banner-content {
        min-height: 500px;
    }

    .atelier-banner-content {
        justify-content: flex-end;
        padding-bottom: 56px;
    }

    .atelier-banner-content h2 {
        font-size: clamp(48px, 14vw, 66px);
    }

    .atelier-banner-content > p:not(.eyebrow) br {
        display: none;
    }

    .section-heading-row {
        align-items: flex-start;
    }

    .instagram-section,
    .partners-section,
    .contact-section {
        padding-top: 78px;
        padding-bottom: 78px;
    }

    .am-instagram-widget {
        margin-top: 38px;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

    .partner-card,
    .partner-card:last-child {
        grid-column: auto;
        min-height: 0;
    }

    .partner-logo-wrap {
        height: 180px;
    }

    .contact-detail {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .contact-form-card {
        padding: 24px 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cookie-banner {
        right: 12px;
        bottom: 12px;
        left: 12px;
        padding: 15px;
    }

    .cookie-content {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .footer-nav {
        grid-template-columns: 1fr 1fr;
    }

    .footer-legal {
        grid-column: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-legal > div {
        justify-content: flex-start;
        gap: 12px 18px;
    }
}

/* =========================================================
   TRES PETITS ECRANS
   ========================================================= */

@media (max-width: 390px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .footer-nav {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ACCESSIBILITE : REDUCTION DES ANIMATIONS
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   NAVIGATION — DROPDOWN PREMIUM & PLUS PRATIQUE
   Conserve le HTML actuel : .dropdown + .sub-btn
   ========================================================= */

@media (min-width: 901px) {
    .header-nav nav .dropdown {
        position: relative;
        display: flex;
        align-items: center;
        padding-right: 16px;
    }

    /* Flèche discrète intégrée au lien principal */
    .header-nav nav .dropdown > a:first-child {
        padding-right: 17px;
    }

    .header-nav nav .dropdown > a:first-child::before {
        content: "";
        position: absolute;
        top: 50%;
        right: 2px;
        width: 6px;
        height: 6px;
        border-right: 1.5px solid rgba(255,255,255,.58);
        border-bottom: 1.5px solid rgba(255,255,255,.58);
        transform: translateY(-65%) rotate(45deg);
        transition: transform .22s ease, border-color .22s ease;
    }

    .header-nav nav .dropdown:hover > a:first-child::before,
    .header-nav nav .dropdown:focus-within > a:first-child::before {
        transform: translateY(-30%) rotate(225deg);
        border-color: #fff;
    }

    /* Zone invisible qui relie le menu au sous-menu : évite qu'il se ferme
       quand on descend la souris vers le bouton. */
    .header-nav nav .dropdown::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        width: 230px;
        height: 18px;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .header-nav nav .dropdown:hover::after,
    .header-nav nav .dropdown:focus-within::after {
        pointer-events: auto;
    }

    .header-nav nav .sub-btn {
        position: absolute !important;
        top: calc(100% + 13px);
        left: 50%;
        width: 220px;
        min-width: 220px;
        min-height: 54px !important;
        padding: 0 46px 0 18px;
        justify-content: flex-start;
        border: 1px solid rgba(255,255,255,.11);
        border-radius: 14px;
        background: rgba(10,10,10,.97);
        box-shadow: 0 22px 60px rgba(0,0,0,.42);
        color: rgba(255,255,255,.88) !important;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: .12em;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate(-50%, -7px) scale(.98);
        transform-origin: top center;
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease,
                    border-color .18s ease, background .18s ease;
    }

    /* Petite barre rouge, cohérente avec l'identité AM Motors */
    .header-nav nav .sub-btn::before {
        content: "";
        position: absolute;
        left: 17px;
        bottom: 10px;
        width: 28px;
        height: 1px;
        background: var(--red-light);
        opacity: .9;
    }

    /* Flèche d'action à droite */
    .header-nav nav .sub-btn::after {
        content: "→";
        position: absolute;
        top: 50%;
        right: 17px;
        color: var(--red-light);
        font-size: 17px;
        font-weight: 300;
        letter-spacing: 0;
        transform: translateY(-52%);
        transition: transform .18s ease;
    }

    .header-nav nav .dropdown:hover .sub-btn,
    .header-nav nav .dropdown:focus-within .sub-btn {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
    }

    .header-nav nav .sub-btn:hover,
    .header-nav nav .sub-btn:focus-visible {
        border-color: rgba(198,0,0,.65);
        background: rgba(17,17,17,.99);
        color: #fff !important;
        outline: none;
    }

    .header-nav nav .sub-btn:hover::after,
    .header-nav nav .sub-btn:focus-visible::after {
        transform: translate(4px, -52%);
    }
}

/* Mobile : le sous-lien reste directement visible, mais sous forme de
   vraie action compacte et facile à toucher. */
@media (max-width: 900px) {
    .header-nav nav .dropdown {
        padding: 0;
    }

    .header-nav nav .dropdown > a:first-child {
        min-height: 54px;
    }

    .header-nav nav .dropdown > a:first-child::before {
        content: none;
    }

    .header-nav nav .dropdown .sub-btn {
        position: static !important;
        width: 100%;
        min-width: 0;
        min-height: 48px !important;
        margin: 0 0 10px;
        padding: 0 14px;
        display: flex;
        align-items: center;
        justify-content: space-between !important;
        border: 1px solid rgba(255,255,255,.09);
        border-radius: 10px;
        background: rgba(255,255,255,.025);
        box-shadow: none;
        color: rgba(255,255,255,.62) !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        font-size: 11px;
        letter-spacing: .10em;
    }

    .header-nav nav .dropdown .sub-btn::after {
        content: "→";
        color: var(--red-light);
        font-size: 17px;
        letter-spacing: 0;
    }

    .header-nav nav .dropdown .sub-btn:hover,
    .header-nav nav .dropdown .sub-btn:focus-visible {
        border-color: rgba(198,0,0,.55);
        background: rgba(198,0,0,.08);
        color: #fff !important;
        outline: none;
    }
}
