/*
 * Feuille de style commune des vitrines « Chez Max ».
 * Design sobre, mobile-first, accessible. Le thème par salon est injecté via
 * les custom properties --brand / --ink / --paper / --on-brand (voir le layout).
 */

:root {
    /* Valeurs de repli (annuaire / salon sans thème). */
    --brand: #1e203f;
    --ink: #101114;
    --paper: #ffffff;
    --on-brand: #ffffff;

    --bg: #f6f6f7;
    --surface: #ffffff;
    --text: #23262b;
    --muted: #6b7280;
    --border: #e5e7eb;
    --border-strong: #d1d5db;

    --font-title: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
    --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(15, 18, 25, 0.06), 0 1px 3px rgba(15, 18, 25, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 18, 25, 0.08), 0 2px 6px rgba(15, 18, 25, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 18, 25, 0.14);

    --container: 1140px;
    --header-h: 68px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    font-family: var(--font-title);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
}

h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 200;
}

.skip-link:focus {
    left: 0;
}

/* ---------- Mise en page ---------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section--tight {
    padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.section--alt {
    background: var(--surface);
}

.section__head {
    text-align: center;
    max-width: 46rem;
    margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
}

.section__eyebrow {
    display: inline-block;
    font-family: var(--font-title);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.section__lead {
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-title);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
    line-height: 1;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--brand {
    background: var(--brand);
    color: var(--on-brand);
    box-shadow: var(--shadow-sm);
}

.btn--brand:hover {
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn--outline:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.btn--ghost {
    background: transparent;
    color: var(--on-brand);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.3rem;
}

/* ---------- En-tête ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
    padding-block: 0.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-title);
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    color: var(--ink);
    text-transform: uppercase;
}

.brand:hover {
    text-decoration: none;
}

.brand__logo {
    height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.nav-toggle-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    cursor: pointer;
    color: var(--ink);
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
}

.nav-toggle .nav-toggle__close {
    display: none;
}

.nav-toggle-input:checked ~ .nav-toggle .nav-toggle__open {
    display: none;
}

.nav-toggle-input:checked ~ .nav-toggle .nav-toggle__close {
    display: block;
}

.main-nav {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1.25rem 1.25rem;
}

.nav-toggle-input:checked ~ .main-nav {
    display: flex;
}

.main-nav a {
    padding: 0.7rem 0.5rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--brand);
    text-decoration: none;
}

.main-nav__cta {
    margin-top: 0.5rem;
}

@media (min-width: 900px) {
    .nav-toggle,
    .nav-toggle-input {
        display: none;
    }

    .main-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        position: static;
        inset: auto;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .main-nav a {
        padding: 0.4rem 0.75rem;
    }

    .main-nav a[aria-current="page"] {
        box-shadow: inset 0 -2px 0 var(--brand);
    }

    .main-nav__cta {
        margin-top: 0;
        margin-left: 0.5rem;
    }
}

/* ---------- Bannière ---------- */

.banner {
    position: relative;
    min-height: clamp(360px, 62vh, 620px);
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: var(--ink);
    overflow: hidden;
}

.banner__media,
.banner__media img,
.banner__media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.banner__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 12, 20, 0.15) 0%, rgba(10, 12, 20, 0.55) 60%, rgba(10, 12, 20, 0.82) 100%);
}

.banner__inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(2rem, 6vw, 3.5rem);
    max-width: 44rem;
}

.banner__title {
    color: #fff;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.banner__tagline {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 1.5rem;
}

.banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- Bandeau d'infos rapides ---------- */

.quickbar {
    background: var(--brand);
    color: var(--on-brand);
}

.quickbar__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    justify-content: center;
    align-items: center;
    padding-block: 0.85rem;
    font-size: 0.95rem;
}

.quickbar a {
    color: var(--on-brand);
    font-weight: 600;
}

.quickbar__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Grilles génériques ---------- */

.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 700px) {
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.split {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .split {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }
}

/* ---------- Cartes ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card__body {
    padding: 1.25rem 1.4rem;
}

.card__title {
    margin-bottom: 0.35rem;
}

/* ---------- Prestations ---------- */

.services__categories {
    display: grid;
    gap: 1.75rem;
}

.service-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.service-group__title {
    margin: 0;
    padding: 1rem 1.4rem;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-title);
    letter-spacing: 0.06em;
    font-size: 1.4rem;
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 1.4rem 0.75rem;
}

.service-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.service-row:last-child {
    border-bottom: 0;
}

.service-row__title {
    font-weight: 600;
    color: var(--text);
}

.service-row__meta {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.service-row__dots {
    flex: 1;
    border-bottom: 1px dotted var(--border-strong);
    transform: translateY(-0.25rem);
    min-width: 1.5rem;
}

.service-row__price {
    font-family: var(--font-title);
    font-size: 1.35rem;
    letter-spacing: 0.03em;
    color: var(--brand);
    white-space: nowrap;
}

.service-row__price--empty {
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 14%, #fff);
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, #fff);
    vertical-align: middle;
    margin-left: 0.4rem;
}

/* ---------- Galerie ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.gallery__item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--border);
    box-shadow: var(--shadow-sm);
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery__item:hover img {
    transform: scale(1.05);
}

@media (min-width: 700px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ---------- Aperçus (home) ---------- */

.preview-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .preview-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.preview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    box-shadow: var(--shadow-sm);
}

.preview-card__price {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--brand);
}

/* ---------- Horaires ---------- */

.hours {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.hours th,
.hours td {
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.hours tr:last-child th,
.hours tr:last-child td {
    border-bottom: 0;
}

.hours th {
    font-weight: 600;
    color: var(--ink);
    width: 45%;
}

.hours td {
    color: var(--text);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hours .is-closed {
    color: var(--muted);
    font-style: italic;
}

.hours tr.is-today th,
.hours tr.is-today td {
    background: color-mix(in srgb, var(--brand) 8%, #fff);
    font-weight: 700;
}

/* ---------- Contact ---------- */

.contact-info {
    display: grid;
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-info__item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.contact-info__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 12%, #fff);
    color: var(--brand);
}

.contact-info__icon svg {
    width: 20px;
    height: 20px;
}

.contact-info__label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.contact-info__value {
    font-weight: 600;
    color: var(--text);
}

.map-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.map-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Réseaux sociaux ---------- */

.social {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
}

.social__link {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    color: var(--ink);
    background: var(--surface);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.social__link:hover {
    background: var(--brand);
    color: var(--on-brand);
    border-color: var(--brand);
}

.social__link svg {
    width: 20px;
    height: 20px;
}

/* ---------- Pied de page ---------- */

.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.78);
    padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
    margin-top: auto;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
    color: #fff;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 760px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }
}

.footer-title {
    font-family: var(--font-title);
    letter-spacing: 0.08em;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    font-size: 0.92rem;
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Contenu markdown (équipe / pages libres) ---------- */

.prose {
    color: var(--text);
    font-size: 1.02rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    color: var(--ink);
    margin-top: 1.6em;
    margin-bottom: 0.5em;
    text-align: center;
}

.prose h1 {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prose h4 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.15em;
}

.prose p {
    margin: 0 0 1rem;
}

.prose a {
    color: var(--brand);
    text-decoration: underline;
}

.prose img {
    border-radius: var(--radius);
    margin-inline: auto;
    box-shadow: var(--shadow-sm);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.92rem;
}

.prose th,
.prose td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.75rem;
    text-align: left;
}

.prose thead th {
    background: color-mix(in srgb, var(--brand) 10%, #fff);
    color: var(--ink);
}

/* Colonnes Wavy -> grille responsive. */
.md-cols {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin: 1.5rem 0;
}

.md-col {
    min-width: 0;
}

.md-col > :first-child {
    margin-top: 0;
}

.md-col img {
    width: 100%;
    object-fit: cover;
}

@media (min-width: 760px) {
    .md-cols {
        grid-template-columns: repeat(var(--md-cols, 1), minmax(0, 1fr));
    }
}

/* Cartes « équipe » issues du markdown. */
.team-section {
    text-align: center;
}

.team-title {
    font-family: var(--font-title);
    color: var(--ink);
}

.team-subtitle {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    margin-top: -0.3rem;
}

.team-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.team-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.team-card .team-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    box-shadow: var(--shadow-sm);
}

.team-name {
    font-family: var(--font-title);
    letter-spacing: 0.05em;
    color: var(--ink);
    margin: 0;
    font-size: 1.2rem;
}

/* ---------- Annuaire ---------- */

.directory-hero {
    background: var(--ink);
    color: #fff;
    text-align: center;
    padding-block: clamp(3rem, 8vw, 5rem);
}

.directory-hero h1 {
    color: #fff;
}

.directory-hero p {
    color: rgba(255, 255, 255, 0.82);
    max-width: 40rem;
    margin: 0.5rem auto 0;
}

.salon-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .salon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .salon-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.salon-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.salon-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
    text-decoration: none;
}

.salon-card__name {
    font-family: var(--font-title);
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.salon-card__city {
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.salon-card__cta {
    margin-top: 0.6rem;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.92rem;
}

/* ---------- Utilitaires ---------- */

.page-main {
    display: flex;
    flex-direction: column;
    min-height: 60vh;
}

.text-center {
    text-align: center;
}

.stack > * + * {
    margin-top: 1rem;
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
