/* MJ Auto : feuille de style du site (écrite à la main, sans outil).
   Mise en page « bento » : des cartes blanches et noires sur fond gris clair, aux couleurs du logo
   (noir, bleu de l'anneau, petite touche de rouge).
   Police libre (SIL OFL, voir assets/fonts/OFL.txt) : Sora.
   Les photos ne sont jamais affichées plus grandes que leur taille réelle, pour rester nettes.
   Animations discrètes, coupées si le visiteur a demandé « moins d'animations ». */

@font-face { font-family: "Sora"; src: url("../fonts/sora-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --bg: #eceef2;
    --card: #ffffff;
    --black: #05060a;
    --black-2: #12141b;
    --blue: #2747c9;        /* anneau du logo */
    --blue-light: #e7ecfc;
    --red: #e3262f;
    --ink: #11131a;
    --muted: #646a78;
    --line: #e1e4ea;
    --radius: 22px;
    --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.65 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.025em; color: var(--black); }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.small { font-size: .82rem; }
.chip { display: inline-block; margin: 0 0 16px; padding: 5px 12px; border-radius: 99px; background: var(--blue-light); color: var(--blue); font-size: .78rem; font-weight: 600; }
.chip-dark { background: rgba(255, 255, 255, .1); color: #c8d3ff; }

/* Logo */
.logo { display: block; }
.logo-small { width: 42px; height: 42px; flex: none; border-radius: 50%; }
.logo-big { width: min(100%, 260px); height: auto; }

/* Boutons */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border: 0; border-radius: 99px; background: var(--blue); color: #fff; font: 600 .98rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.button:hover { background: #1d38a8; transform: translateY(-1px); }
.button-ghost { background: var(--bg); color: var(--black); }
.button-ghost:hover { background: #dfe2e9; }

/* En-tête : une barre flottante arrondie */
.top { position: sticky; top: 10px; z-index: 20; padding: 0 0 0; }
.top-inner { display: flex; align-items: center; gap: 22px; min-height: 64px; margin-top: 10px; padding: 0 10px 0 14px; border-radius: 99px; background: rgba(5, 6, 10, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 12px 30px rgba(5, 6, 10, .2); }
.wrap.top-inner { max-width: 1168px; width: calc(100% - 32px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.menu { display: flex; gap: 6px; margin-left: auto; }
.menu a { padding: 8px 14px; border-radius: 99px; color: #d6d9e2; text-decoration: none; font-size: .92rem; transition: background .2s, color .2s; }
.menu a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.top-call { padding: 10px 16px; border-radius: 99px; background: var(--blue); color: #fff; font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.phone-short { display: none; }

/* La grille de cartes du haut */
.bento { display: grid; gap: 12px; margin-top: 18px; }
.tile { position: relative; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.tile-intro { padding: 30px 26px; }
.tile-intro > p:not(.chip):not(.tile-actions) { color: var(--muted); max-width: 32em; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.tile-logo { display: grid; place-items: center; padding: 22px; background: #000; }
.js .tile-logo .logo-big { animation: apparait 1.2s var(--ease) .2s both; }
@keyframes apparait { from { opacity: 0; transform: scale(.9) rotate(-8deg); } to { opacity: 1; transform: none; } }
.tile-photo { margin: 0; background: var(--black); }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 382 / 510; }
.tile-status { display: flex; flex-direction: column; justify-content: center; padding: 22px 24px; }
.tile-label { margin: 0 0 6px; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tile-small { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.tile-phares { display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px; color: #fff; text-decoration: none; background: var(--black); }
.tile-phares img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.tile-phares::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(5, 6, 10, .85)); }
.tile-phares span { position: relative; z-index: 1; display: flex; flex-direction: column; padding: 18px 20px; font-weight: 600; }
.tile-phares strong { font-weight: 400; font-size: .86rem; color: #c8d3ff; }
.tile-phares:hover img { transform: scale(1.05); }
.tile-occasion { display: flex; flex-direction: column; justify-content: center; padding: 22px 24px; background: var(--blue); color: #fff; }
.tile-occasion .tile-label { color: #c8d3ff; }
.tile-big { margin: 0 0 12px; font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.tile-link { color: #fff; font-weight: 600; text-decoration: none; }

.open-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 1.02rem; }
.open-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.open-status.is-open::before { background: #1fa863; box-shadow: 0 0 0 0 rgba(31, 168, 99, .5); animation: pouls 2s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 9px rgba(31, 168, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 168, 99, 0); } }

.js .rise { opacity: 0; transform: translateY(16px) scale(.98); animation: monte .8s var(--ease) forwards; }
.js .bento .rise:nth-child(2) { animation-delay: .06s; }
.js .bento .rise:nth-child(3) { animation-delay: .12s; }
.js .bento .rise:nth-child(4) { animation-delay: .18s; }
.js .bento .rise:nth-child(5) { animation-delay: .24s; }
.js .bento .rise:nth-child(6) { animation-delay: .3s; }
@keyframes monte { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Sections */
.section { padding: 70px 0 0; }
.section-head { margin-bottom: 26px; }
.services { display: grid; gap: 12px; }
.service { display: flex; flex-direction: column; padding: 24px 22px; border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.service:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(17, 19, 26, .08); }
.service-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; padding: 11px; border-radius: 14px; background: var(--black); color: #fff; }
.service-icon svg { width: 100%; height: 100%; }
.service p { color: var(--muted); font-size: .93rem; }
.service-cta { margin-top: auto; color: var(--blue); font-weight: 600; font-size: .9rem; }
.service-cta::after { content: " →"; }

/* Avant / après */
.compare-section { display: grid; gap: 22px; align-items: center; }
.compare-text { padding: 28px 24px; border-radius: var(--radius); background: var(--card); }
.compare-text > p:not(.chip):not(.compare-hint) { color: var(--muted); }
.compare-hint { color: var(--blue); font-size: .88rem; font-weight: 600; }
.compare { position: relative; justify-self: center; width: 100%; max-width: 420px; aspect-ratio: 334 / 388; border-radius: var(--radius); overflow: hidden; background: var(--black); user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .4); pointer-events: none; }
.compare-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--black); font-weight: 700; letter-spacing: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible ~ .compare-handle::after, .compare:focus-within .compare-handle::after { outline: 3px solid var(--blue); }
.compare-tag { position: absolute; top: 14px; padding: 4px 12px; border-radius: 99px; background: rgba(5, 6, 10, .75); color: #fff; font-size: .8rem; font-weight: 600; pointer-events: none; }
.compare-tag-l { left: 14px; }
.compare-tag-r { right: 14px; background: var(--blue); }

/* Rendez-vous */
.rdv-card { display: grid; gap: 22px; padding: 26px 20px; border-radius: 28px; background: var(--black); background-image: radial-gradient(circle at 0% 0%, #1a2340 0%, var(--black) 55%); color: #c9cdd8; }
.rdv-card h2 { color: #fff; }
.rdv-points { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.rdv-points li { position: relative; padding-left: 28px; color: #e2e5ee; }
.rdv-points li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 12px no-repeat; }
.rdv-form { padding: 24px 20px; border-radius: var(--radius); background: var(--card); color: var(--ink); }
.form { display: grid; gap: 16px; }
.form label { display: block; font-weight: 600; font-size: .9rem; }
.form input:not([type="radio"]), .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #f6f7f9; color: var(--ink); font: 1rem/1.4 var(--font); transition: border-color .2s, background .2s; }
.form input[type="date"] { min-height: 49px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.form-row { display: grid; gap: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.seg legend { grid-column: 1 / -1; margin-bottom: 6px; padding: 0; font-weight: 600; font-size: .9rem; }
.seg label { position: relative; margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: #f6f7f9; text-align: center; font-weight: 500; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.seg input:checked + span { background: var(--black); border-color: var(--black); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--blue); }
.date-warn { margin: -6px 0 0; color: var(--red); font-size: .88rem; font-weight: 600; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0; }
.optional { font-weight: 400; font-size: .82rem; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: #f4f5f8; }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { border-left: 4px solid #1fa863; }
.notice-error { border-left: 4px solid var(--red); }

/* Contact */
.contact { display: grid; gap: 12px; }
.contact-info { padding: 28px 24px; }
.phone a { color: var(--black); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.mail { color: var(--blue); }
.address { color: var(--muted); }
.open-status-box { margin: 4px 0 10px; font-size: .95rem; }
.hours { width: 100%; max-width: 420px; border-collapse: collapse; }
.hours caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.hours th, .hours td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; font-size: .92rem; }
.hours td { text-align: right; color: var(--muted); }
.hours .today > * { color: var(--blue); font-weight: 600; }
.map { min-height: 340px; }
.map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; background: var(--line); }

/* Pied de page */
.bottom { margin-top: 70px; padding: 26px 0 30px; background: var(--black); color: #9aa0ad; font-size: .88rem; }
.bottom-inner { display: flex; align-items: center; gap: 16px; }
.bottom a { color: #fff; }
.bottom p { margin: 0; }

/* Téléphone */
@media (max-width: 859px) {
    .menu { display: none; }
    .top-call { margin-left: auto; }
    .phone-long { display: none; }
    .phone-short { display: inline; }
    .tile-actions .button { flex: 1 1 auto; }
    .bento { grid-template-columns: 1fr 1fr; }
    .tile-intro, .tile-occasion { grid-column: 1 / -1; }
    .tile-logo { padding: 18px; }
    .tile-status { grid-column: 1 / -1; }
    .tile-phares { grid-column: 1 / -1; min-height: 200px; }
}

/* Tablette et ordinateur */
@media (min-width: 640px) {
    .services { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr 1fr; align-items: end; }
    .contact { grid-template-columns: 1fr 1.3fr; }
}
@media (min-width: 860px) {
    .bento { grid-template-columns: 1.5fr 1fr 1fr; grid-template-areas: "intro logo photo" "intro status photo" "phares phares occasion"; }
    .tile-intro { grid-area: intro; display: flex; flex-direction: column; justify-content: center; padding: 44px 42px; }
    .tile-logo { grid-area: logo; }
    .tile-photo { grid-area: photo; }
    .tile-status { grid-area: status; }
    .tile-phares { grid-area: phares; min-height: 240px; }
    .tile-phares img { object-position: 50% 45%; }
    .tile-occasion { grid-area: occasion; }
    .services { grid-template-columns: repeat(3, 1fr); }
    .compare-section { grid-template-columns: 1fr 1fr; gap: 12px; }
    .compare-text { padding: 40px 38px; }
    .rdv-card { grid-template-columns: .8fr 1.2fr; gap: 40px; padding: 44px; }
    .rdv-form { padding: 30px 30px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal, .js .rise { opacity: 1; transform: none; }
}
