/* 1. Variables Globales */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --dark: #0f172a;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;
}

/* 2. Global Resets */
body {
    background-color: var(--bg);
    color: var(--dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 3. Navigation */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.nav-link {
    color: var(--dark);
    font-weight: 500;
}

/* 4. Sections & Typographie */
h2 { font-weight: 700; color: var(--dark); margin-bottom: 2rem; }

.hero { padding: 5rem 0; text-align: center; }
.hero h1 { font-weight: 800; font-size: 3.5rem; color: var(--dark); margin-bottom: 1rem; }
.hero p { color: #64748b; font-size: 1.25rem; max-width: 600px; margin: 0 auto; }

.cta-section {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4rem 0;
}

.section-divider {
    width: 80px;
    height: 3px;
    background-color: var(--primary);
    margin: 1rem auto 2rem auto;
    border-radius: 2px;
}
.article-divider {
    width: 100px;
    height: 3px;
    background-color: var(--primary);
    margin: 3rem 0;
    border-radius: 2px;
}

/* 5. Composants (Boutons & Cartes) */
.btn-primary, .btn-brand {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}
.btn-primary:hover, .btn-brand:hover {
    background-color: var(--primary-hover);
    color: var(--white);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

.card, .card-process, .card-quality {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}
.card:hover {
    transform: translateY(-5px);
}
.card-img-top {
    border-radius: 12px 12px 0 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Les attributs width/height des images (anti-décalage de mise en page) fixent les proportions,
   pas la taille : quand la largeur s'adapte, la hauteur suit. */
img[height] {
    height: auto;
    max-width: 100%;
}

/* 6. Spécifique Blog/Article */
.badge-cat {
    background-color: #e0e7ff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}
.article-content img {
    border-radius: 12px;
    margin: 1.5rem 0;
    max-width: 100%;
}
.comment-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* Dashboard layout */
.custom-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    height: 100%;
}

.avatar-circle {
    width: 96px;
    height: 96px;
    background: var(--bs-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.dashboard-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--bs-dark);
}

/* Dashboard Navigation */
.nav-tabs .nav-link {
    color: #64748b;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: color 0.2s;
}
.nav-tabs .nav-link.active {
    color: var(--bs-primary);
    border-bottom: 2px solid var(--bs-primary);
    background: transparent;
}
.nav-tabs .nav-link:hover {
    border: none;
    color: var(--bs-primary);
}

/* Style spécifique pour la page Sifflet */
.sifflet-hero {
    background: #ffffff;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.feature-icon-wrapper {
    width: 40px;
    height: 40px;
    background: #e0e7ff;
    color: var(--bs-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.sifflet-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.2s;
    background: #fff;
}

.sifflet-card:hover {
    transform: translateY(-3px);
}

/* Amélioration des cartes de processus */
.card-process {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 2rem;
    position: relative;
    /* Espace pour le trait bleu */
    padding-top: 2.5rem;
}

.card-process::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    width: 50px;
    height: 4px;
    background-color: var(--bs-primary);
    border-radius: 0 0 2px 2px;
}


.featured-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 2rem;
    position: relative;
    padding-top: 2.5rem;
    transition: transform 0.2s;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    width: 50px;
    height: 4px;
    background-color: #6366f1;
    border-radius: 0 0 2px 2px;
}

.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--bs-dark);
}

.nav-link {
    font-weight: 500;
    color: #475569 !important;
    transition: color 0.2s;
    margin: 0 0.5rem;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
}

.btn-account {
    background-color: var(--bs-primary);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-account:hover {
    background-color: #4f46e5;
    color: white !important;
}

/* Blog : contenu Markdown des articles */
.article-content h2, .article-content h3 { margin-top: 2rem; }
.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.5rem 1rem;
    color: #475569;
    background: var(--white);
}
.article-content pre {
    background: var(--dark);
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
.article-content :not(pre) > code {
    background: #e0e7ff;
    color: var(--primary-hover);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}
.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 1rem;
}
.article-content th, .article-content td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
}

/* Boutique : texte Markdown de la fiche d'un objet (titres à l'échelle de la colonne) */
.shop-text h1, .shop-text h2, .shop-text h3, .shop-text h4 { font-size: 1.1rem; font-weight: 600; margin-top: 1.25rem; }
.shop-text > :first-child { margin-top: 0; }
.shop-text > :last-child { margin-bottom: 0; }

/* Images des cartes et couvertures d'articles : format de partage 1200 × 630, recadré si besoin
   (la place est réservée avant le chargement : la page ne « saute » pas) */
.card-img-cover { aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; height: auto; }
.card-img-placeholder {
    aspect-ratio: 1200 / 630;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #eef2ff);
    color: var(--primary); font-weight: 700; font-size: 1.25rem;
}

/* Espace membre et espace client : menu latéral et cartes */
.account-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}
@media (min-width: 992px) {
    .account-sidebar { position: sticky; top: 1rem; }
}
.account-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.account-nav-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin: .75rem .75rem .25rem;
}
.account-nav a {
    display: block;
    padding: .45rem .75rem;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    font-size: .95rem;
}
.account-nav a:hover { background: var(--bg); }
.account-nav a.active {
    background: #eef2ff;
    color: var(--primary-hover);
    font-weight: 600;
}
/* Badges « primaire » (étapes de projet, tableau de bord) aux couleurs du site */
.text-bg-primary { background-color: var(--primary) !important; }

/* Planning d'un projet (espace client) : frise verticale des jalons */
.milestones { position: relative; padding-left: 0; }
.milestone { position: relative; display: flex; gap: .85rem; padding-bottom: 1rem; }
.milestone:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: #e2e8f0; }
.milestone-dot { flex: 0 0 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: #fff; background: #fff; border: 2px solid #cbd5e1; }
.milestone-done .milestone-dot { background: #0ca30c; border-color: #0ca30c; }
.milestone-late .milestone-dot { background: #d03b3b; border-color: #d03b3b; }
.milestone-in_progress .milestone-dot { background: #6366f1; border-color: #6366f1; font-size: .6rem; }
.milestone-body { flex: 1; min-width: 0; padding-top: .15rem; }

/* ---------- Téléchargements ---------- */
.download-card .download-lock { position: absolute; top: 12px; right: 12px; font-size: .8rem; }
.download-main { aspect-ratio: 4 / 3; object-fit: cover; height: auto; background: #f1f5f9; }
.download-thumb { border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; background: none; opacity: .75; transition: opacity .15s, border-color .15s; }
.download-thumb img { width: 96px; height: 72px; object-fit: cover; display: block; }
.download-thumb:hover, .download-thumb.is-active { opacity: 1; border-color: var(--primary); }
.download-box { border: 1px solid #e2e8f0; border-radius: 16px; background: #f8fafc; }
.download-ext { min-width: 3.2rem; }
.download-members { background: #eef2ff; }
.download-tips { background: #f8fafc; border: 1px solid #e2e8f0; }
.min-w-0 { min-width: 0; }
.model-stage { height: min(70vh, 640px); background: #f1f5f9; touch-action: none; }
.model-stage canvas { display: block; width: 100%; height: 100%; }
.model-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 1rem; text-align: center; font-weight: 600; color: #475569; pointer-events: none; }
@media (max-width: 767.98px) { .model-stage { height: calc(100vh - 150px); } }

/* ---------- Devis d'impression 3D ---------- */
.pq-num { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1rem; margin-right: .4rem; vertical-align: middle; }
.pq-drop { display: flex; flex-direction: column; align-items: center; gap: .25rem; border: 2px dashed #cbd5e1; border-radius: 16px; padding: 2.5rem 1rem; text-align: center; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.pq-drop:hover, .pq-drop:focus, .pq-drop.is-over { border-color: var(--primary); background: #eef2ff; outline: none; }
.pq-file { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; border: 1px solid #e2e8f0; border-radius: 12px; padding: .75rem 1rem; background: #fff; margin-bottom: .5rem; }
.pq-file .pq-name { flex: 1 1 200px; min-width: 0; }
.pq-file .pq-qty { width: 6rem; }
.pq-file.is-error { border-color: #fca5a5; background: #fef2f2; }
.pq-choice { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid #e2e8f0; border-radius: 12px; padding: .75rem .9rem; background: #fff; cursor: pointer; height: 100%; }
.pq-choice:has(input:checked) { border-color: var(--primary); background: #eef2ff; }
.pq-choice .form-check-input { margin-top: .25rem; flex: none; }
.pq-summary { position: sticky; top: 1.5rem; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; padding: 1.5rem; box-shadow: 0 6px 24px rgba(15, 23, 42, .05); }
.pq-price { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
/* Menu principal : un lien ne passe jamais sur deux lignes */
.navbar-nav .nav-link { white-space: nowrap; }

/* Boutique : page d'attente (templates/pages/boutique.html.twig) */
.shop-soon { padding: 4rem 0 5rem; }
.shop-soon-card {
    max-width: 720px; margin: 0 auto; padding: 3.5rem 2rem; text-align: center;
    background: radial-gradient(circle at top, rgba(99, 102, 241, .12), transparent 60%), var(--white, #fff);
    border: 1px solid rgba(99, 102, 241, .15); border-radius: 1.5rem; box-shadow: 0 20px 45px -25px rgba(15, 23, 42, .35);
}
.shop-soon-icon {
    width: 88px; height: 88px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--primary); color: #fff; box-shadow: 0 10px 25px -8px rgba(99, 102, 241, .7);
}
.shop-soon-kicker { color: var(--primary); letter-spacing: .08em; }
.shop-soon h1 { font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); color: var(--dark); }
.shop-soon .lead { color: #64748b; max-width: 520px; margin: 1rem auto 2rem; }
.shop-soon-notify {
    max-width: 520px; margin: 0 auto; padding: 1.5rem; border-radius: 1rem;
    background: var(--white, #fff); border: 1px solid #e2e8f0;
}

/* En-tête des pages de liste (blog…) : bandeau, filtres en pastilles et recherche sur une ligne */
.page-head {
    /* collé au menu : compense la marge de la zone des messages (vide le plus souvent) */
    padding: 2.5rem 0 3rem; margin: -1rem 0 2.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, .10), rgba(99, 102, 241, .02) 60%), var(--white, #fff);
    border-bottom: 1px solid #e2e8f0;
}
.page-head .breadcrumb a { color: var(--primary); text-decoration: none; }
.page-head .breadcrumb a:hover { text-decoration: underline; }
.page-head-title { font-weight: 800; font-size: clamp(2.25rem, 5vw, 3.5rem); color: var(--dark); margin-bottom: .75rem; }
.page-head-intro { color: #64748b; font-size: 1.15rem; max-width: 640px; margin: 0; }
.chip-link {
    display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px;
    background: var(--white, #fff); border: 1px solid #e2e8f0; color: #334155; font-size: .875rem; font-weight: 500;
    text-decoration: none; transition: border-color .15s, color .15s, box-shadow .15s;
}
.chip-link svg { color: var(--primary); }
.chip-link:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 4px 12px -6px rgba(99, 102, 241, .5); }

.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.filter-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-pill {
    padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid #e2e8f0; background: var(--white, #fff);
    color: #475569; font-weight: 600; font-size: .9rem; text-decoration: none; line-height: 1.2;
    transition: border-color .15s, color .15s, background-color .15s;
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.list-search {
    position: relative; display: flex; align-items: center; flex: 0 1 420px; min-width: 260px;
    background: var(--white, #fff); border: 1px solid #e2e8f0; border-radius: 999px; padding: .25rem .25rem .25rem 2.5rem;
    transition: border-color .15s, box-shadow .15s;
}
.list-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15); }
.list-search-icon { position: absolute; left: .9rem; color: #94a3b8; pointer-events: none; }
.list-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .4rem .25rem; font-size: .95rem; }
.list-search button {
    border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; font-size: .875rem;
    padding: .45rem 1.1rem; transition: background-color .15s;
}
.list-search button:hover { background: var(--primary-hover); }
@media (max-width: 575.98px) {
    .page-head { padding: 1.5rem 0 2rem; margin-bottom: 1.5rem; }
    .list-search { flex: 1 1 100%; min-width: 0; }
}

/* Liste avec plusieurs filtres (téléchargements) : choix du format à côté de la recherche */
.list-search-form { display: flex; flex-wrap: wrap; gap: .5rem; flex: 0 1 600px; min-width: 260px; }
.list-search-form .list-search { flex: 1 1 280px; min-width: 0; }
.list-select {
    appearance: none; border: 1px solid #e2e8f0; border-radius: 999px; background-color: var(--white, #fff);
    padding: .55rem 2.25rem .55rem 1.1rem; font-weight: 600; font-size: .9rem; color: #475569; cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right .9rem center; background-size: 12px;
    transition: border-color .15s, box-shadow .15s;
}
.list-select:hover { border-color: var(--primary); }
.list-select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15); }
@media (max-width: 575.98px) {
    .list-search-form { flex: 1 1 100%; min-width: 0; }
    .list-select { flex: 1 1 100%; }
}

/* En-tête commun (partials/_page_head.html.twig) : variantes et éléments */
.page-head-kicker { color: var(--primary); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.page-head-meta { color: #64748b; font-size: .95rem; margin: 1rem 0 0; }
.page-head-center { text-align: center; }
.page-head-center .page-head-intro { margin-left: auto; margin-right: auto; }
.page-head-center .page-head-actions, .page-head-center .breadcrumb { justify-content: center; }
.page-head-home { padding: 4.5rem 0 5rem; }
.page-head-home .page-head-title { font-size: clamp(2.5rem, 7vw, 4.25rem); }
.page-head-home .page-head-intro { font-size: 1.3rem; }
.page-head .btn-brand, .page-head .btn-outline-primary { border-radius: 999px; padding: .6rem 1.4rem; border: 2px solid var(--primary); }

/* Carte centrée des pages courtes (confirmation, erreur, désabonnement…) : même style que la boutique */
.notice-page { padding: 3.5rem 0 5rem; }
.notice-card {
    max-width: 720px; margin: 0 auto; padding: 3rem 2rem; text-align: center;
    background: radial-gradient(circle at top, rgba(99, 102, 241, .12), transparent 60%), var(--white, #fff);
    border: 1px solid rgba(99, 102, 241, .15); border-radius: 1.5rem; box-shadow: 0 20px 45px -25px rgba(15, 23, 42, .35);
}
.notice-card h1 { font-weight: 800; font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--dark); }
.notice-card .lead { color: #64748b; max-width: 560px; margin: 1rem auto 2rem; }
.notice-icon {
    width: 80px; height: 80px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--primary); color: #fff; font-size: 2rem; font-weight: 800;
    box-shadow: 0 10px 25px -8px rgba(99, 102, 241, .7);
}
.notice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.notice-actions .btn { border-radius: 999px; padding: .6rem 1.4rem; border: 2px solid var(--primary); }

/* Couleurs du site pour les éléments Bootstrap : liens, champs, cases, pagination */
:root {
    --bs-primary: #6366f1; --bs-primary-rgb: 99, 102, 241;
    --bs-primary-text-emphasis: #4338ca; --bs-primary-bg-subtle: #eef2ff; --bs-primary-border-subtle: #c7d2fe;
    --bs-link-color: #6366f1; --bs-link-color-rgb: 99, 102, 241;
    --bs-link-hover-color: #4f46e5; --bs-link-hover-color-rgb: 79, 70, 229;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15);
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.pagination { gap: .35rem; }
.pagination .page-link { border-radius: 999px !important; border: 1px solid #e2e8f0; color: #475569; font-weight: 600; min-width: 2.5rem; text-align: center; }
.pagination .page-link:hover { border-color: var(--primary); color: var(--primary); background: var(--white, #fff); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-item.disabled .page-link { background: transparent; color: #cbd5e1; }
.notice-page + .notice-links { margin-top: -2.5rem; }

/* Connexion, inscription, mot de passe oublié : carte au style des pages courtes */
.auth-card {
    border: 1px solid rgba(99, 102, 241, .15); border-radius: 1.5rem;
    background: radial-gradient(circle at top, rgba(99, 102, 241, .10), transparent 55%), var(--white, #fff);
    box-shadow: 0 20px 45px -25px rgba(15, 23, 42, .35);
}
.auth-card h1 { font-weight: 800; color: var(--dark); }
.auth-card .btn-brand { border-radius: 999px; }

/* ---------------------------------------------------------------- Ornements personnalisés */
.orn-viewer { position: relative; aspect-ratio: 1 / 1; max-height: 70vh; border-radius: 1rem; background: radial-gradient(circle at 50% 35%, #ffffff, #e9edf3); overflow: hidden; }
.orn-viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.orn-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.orn-style { display: block; border: 2px solid var(--bs-border-color, #dee2e6); border-radius: .75rem; padding: .75rem; cursor: pointer; height: 100%; }
.orn-style input { position: absolute; opacity: 0; }
.orn-style:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15); }
.orn-style:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.orn-swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.orn-swatch { display: flex; flex-direction: column; align-items: center; gap: .2rem; cursor: pointer; width: 4.2rem; text-align: center; }
.orn-swatch input { position: absolute; opacity: 0; }
.orn-swatch span { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .15); }
.orn-swatch small { font-size: .72rem; line-height: 1.1; }
.orn-swatch:has(input:checked) span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary); }
.orn-swatch:has(input:focus-visible) span { outline: 2px solid var(--primary); outline-offset: 4px; }
.orn-thumb { width: 72px; height: 72px !important; flex: none; object-fit: cover; border-radius: .5rem; background: #eef1f5; }
.orn-relay-widget { min-height: 420px; }
@media (prefers-color-scheme: dark) {
    .orn-viewer { background: radial-gradient(circle at 50% 35%, #2b3442, #151a22); }
}

/* ---------------------------------------------------------------- Boutique (templates/shop) */
.shop-card { border-radius: 16px; overflow: hidden; }
.shop-card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; }
.shop-badge { position: absolute; top: 12px; left: 12px; }
.shop-price { font-weight: 800; font-size: 1.25rem; color: var(--primary); white-space: nowrap; }
.shop-price-lg { font-size: 2.2rem; line-height: 1.1; }
.shop-dots { display: inline-flex; align-items: center; gap: 4px; }
.shop-dots > span:not(.visually-hidden) { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.shop-dots small { color: #64748b; }
.shop-feature { border-radius: 20px; padding: 2rem; background: linear-gradient(135deg, #eef2ff, #fdf2f8); border: 1px solid #e0e7ff; }
.shop-feature-kicker { color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .25rem; }
.shop-photo { aspect-ratio: 4 / 3; object-fit: cover; background: #eef1f5; display: flex; align-items: center; justify-content: center; }
.shop-buy { position: sticky; top: 1.5rem; }
.shop-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0; }
.shop-thumb { display: block; width: 96px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: .75; transition: opacity .15s, border-color .15s; }
.shop-thumb:hover, .shop-thumb:focus-visible, .shop-thumb[aria-current="true"] { opacity: 1; }
.shop-thumb[aria-current="true"] { border-color: var(--primary); }
.shop-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shop-stock { font-weight: 600; color: #047857; }
.shop-assurances { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 3rem 0 0; padding: 1.5rem; border-radius: 20px; background: #fff; border: 1px solid #eef2f7; }
.shop-assurances li { display: flex; flex-direction: column; font-size: .9rem; }
.shop-assurances span { color: #475569; }
.shop-color-dot { flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .15); }
.shop-color-dot.is-empty { border-style: dashed; }

/* Fiche d'un objet (templates/shop/product.html.twig) : mise en page éditoriale, sans bandeau de titre */
.pdp { padding: 1.25rem 0 3rem; }
.pdp-crumbs { margin-bottom: 1.5rem; }
.pdp-added { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem 1rem; margin-bottom: 1.5rem; border-radius: 14px; background: #ecfdf5; border: 1px solid #a7f3d0; }
.pdp-added > span { margin-right: auto; }
.pdp-gallery { display: grid; gap: .75rem; }
@media (min-width: 992px) {
    .pdp-gallery.has-thumbs { grid-template-columns: 76px 1fr; }
    .pdp-gallery.has-thumbs .pdp-thumbs { grid-row: 1; grid-column: 1; flex-direction: column; }
    .pdp-gallery.has-thumbs .pdp-stage { grid-column: 2; }
}
.pdp-stage { border-radius: 24px; overflow: hidden; background: #eef1f5; }
.pdp-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.pdp-noimg { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-weight: 600; }
.pdp-thumbs { display: flex; gap: .6rem; margin: 0; overflow-x: auto; }
.pdp-thumbs .shop-thumb { width: 76px; border-radius: 14px; opacity: .65; }
.pdp-thumbs .shop-thumb img { aspect-ratio: 1 / 1; height: auto; }
.pdp-buy { position: sticky; top: 1.5rem; padding-top: .25rem; }
.pdp-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: .6rem; }
.pdp-kicker a { color: inherit; text-decoration: none; }
.pdp-title { font-weight: 800; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -.02em; color: var(--dark); margin-bottom: .75rem; }
.pdp-lead { font-size: 1.1rem; color: #475569; margin-bottom: 1.5rem; }
.pdp-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; }
.pdp-price { font-size: 2rem; font-weight: 800; color: var(--dark); letter-spacing: -.01em; }
.pdp-avail { font-size: .9rem; color: #047857; display: inline-flex; align-items: center; gap: .4rem; }
.pdp-avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pdp-avail.is-out { color: #64748b; }
.pdp-label { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #64748b; margin-bottom: .45rem; }
.pdp-select { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.pdp-select .form-select { border-radius: 999px; padding-left: 1rem; max-width: 22rem; }
.pdp-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.pdp-qty { display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 999px; overflow: hidden; background: #fff; }
.pdp-qty button { border: 0; background: none; width: 2.6rem; height: 3rem; font-size: 1.2rem; color: var(--dark); }
.pdp-qty button:hover { background: #f1f5f9; }
.pdp-qty input { width: 2.6rem; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.pdp-qty input::-webkit-outer-spin-button, .pdp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-add { flex: 1 1 14rem; border-radius: 999px; height: 3rem; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font-weight: 600; }
.pdp-add-total { opacity: .8; font-weight: 500; padding-left: .6rem; border-left: 1px solid rgba(255, 255, 255, .4); }
.pdp-note { font-size: .85rem; color: #64748b; margin: .6rem 0 0; }
.pdp-promises { display: grid; gap: .55rem; margin: 1.75rem 0 1rem; font-size: .92rem; color: #334155; }
.pdp-promises li { display: flex; align-items: center; gap: .6rem; }
.pdp-promises svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pdp-legal { font-size: .78rem; color: #94a3b8; margin: 0; }
.pdp-story { background: #fff; border-top: 1px solid #eef2f7; border-bottom: 1px solid #eef2f7; padding: 3.5rem 0; }
.pdp-h2 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; color: var(--dark); margin-bottom: 1.25rem; }
.pdp-text { font-size: 1.02rem; line-height: 1.75; color: #334155; max-width: 65ch; }
.pdp-specs { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid #e2e8f0; }
.pdp-specs dt { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.pdp-specs dd { margin: 0; color: #334155; }
.pdp-journey { border-radius: 24px; padding: 2rem; background: linear-gradient(160deg, #eef2ff, #f8fafc 60%); }
.pdp-journey ol { counter-reset: step; margin: 0; }
.pdp-journey li { counter-increment: step; position: relative; padding: 0 0 1.4rem 3rem; }
.pdp-journey li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pdp-journey li:not(:last-child)::after { content: ""; position: absolute; left: calc(1rem - 1px); top: 2.1rem; bottom: .3rem; border-left: 2px dashed #c7d2fe; }
.pdp-journey strong { display: block; color: var(--dark); }
.pdp-journey span { color: #475569; font-size: .92rem; }
.pdp-journey-foot { font-size: .85rem; color: #64748b; margin: .5rem 0 0; }
.pdp-related { padding-top: 3.5rem; padding-bottom: 1rem; }
@media (max-width: 575.98px) { .pdp-add-total { display: none; } }

/* Vignettes d'objets (liste de la boutique, même collection) : photo, nom et prix, sans cadre */
.shop-tile-link { display: block; color: inherit; text-decoration: none; }
.shop-tile-media { position: relative; display: block; border-radius: 20px; overflow: hidden; background: #eef1f5; aspect-ratio: 4 / 3; }
.shop-tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.shop-tile-link:hover .shop-tile-media img, .shop-tile-link:focus-visible .shop-tile-media img { transform: scale(1.04); }
.shop-tile-noimg { display: flex; height: 100%; align-items: center; justify-content: center; color: #94a3b8; font-weight: 600; padding: 1rem; text-align: center; }
.shop-tile-flag { position: absolute; top: 12px; left: 12px; padding: .25rem .65rem; border-radius: 999px; background: rgba(15, 23, 42, .78); color: #fff; font-size: .75rem; font-weight: 600; backdrop-filter: blur(4px); }
.shop-tile-body { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem 1rem; margin-top: .85rem; }
.shop-tile-name { font-weight: 700; color: var(--dark); }
.shop-tile-link:hover .shop-tile-name { color: var(--primary); }
.shop-tile-price { font-weight: 600; color: #334155; white-space: nowrap; }
.shop-tile-meta { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; font-size: .85rem; color: #64748b; }
.shop-tile-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-section { margin-bottom: 4rem; }
.shop-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; margin-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; }
.shop-section-head h2 { font-weight: 800; font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -.01em; color: var(--dark); margin: 0; }
.shop-section-head span { font-size: .85rem; color: #94a3b8; white-space: nowrap; }
.shop-section-intro { color: #64748b; max-width: 60ch; margin: -.75rem 0 1.5rem; }

/* Panier (templates/shop/cart.html.twig) : étapes numérotées à gauche, récapitulatif collant à droite */
.cart { padding-top: 1.25rem; padding-bottom: 4rem; }
.cart-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.cart-head h1 { font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: -.02em; color: var(--dark); margin: 0; }
.cart-head span { color: #94a3b8; }
.cart-empty { padding: 3rem 0; text-align: center; color: #64748b; }
.cart-step { background: #fff; border: 1px solid #eef2f7; border-radius: 24px; padding: 1.75rem; margin-bottom: 1.25rem; }
.cart-step h2 { display: flex; align-items: center; gap: .75rem; font-weight: 800; font-size: 1.2rem; color: var(--dark); margin-bottom: 1.25rem; }
.cart-step h2 > span { width: 1.9rem; height: 1.9rem; flex: none; border-radius: 50%; background: var(--primary); color: #fff; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; }
.cart-step h2 small { font-weight: 400; font-size: .85rem; color: #94a3b8; }
.cart-lines { margin: 0; }
.cart-line { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid #eef2f7; }
.cart-line:first-child { padding-top: 0; }
.cart-thumb .orn-thumb { width: 88px; height: 88px !important; border-radius: 16px; }
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; color: var(--dark); }
.cart-line-name a { color: inherit; text-decoration: none; }
.cart-line-name a:hover { color: var(--primary); }
.cart-line-details { font-size: .88rem; color: #64748b; margin-top: .15rem; }
.cart-line-actions { display: flex; align-items: center; gap: 1rem; margin-top: .65rem; }
.pdp-qty-sm button { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
.pdp-qty-sm button:disabled { opacity: .3; }
.pdp-qty-sm span { min-width: 1.8rem; text-align: center; font-weight: 600; }
.cart-remove { border: 0; background: none; padding: 0; font-size: .85rem; color: #94a3b8; text-decoration: underline; text-underline-offset: 3px; }
.cart-remove:hover { color: #dc2626; }
.cart-line-price { text-align: right; white-space: nowrap; }
.cart-line-price strong { display: block; color: var(--dark); }
.cart-line-price small { color: #94a3b8; }
.cart-more { font-size: .88rem; color: #64748b; margin: 1rem 0 0; }
.cart-input { border-radius: 12px; padding: .65rem .9rem; }
.cart-choices { display: grid; gap: .75rem; }
.cart-choice { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; border: 1.5px solid #e2e8f0; border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.cart-choice:hover { border-color: #c7d2fe; }
.cart-choice:has(input:checked) { border-color: var(--primary); background: #f5f7ff; }
.cart-choice input { accent-color: var(--primary); width: 1.1rem; height: 1.1rem; flex: none; }
.cart-choice-body { flex: 1; display: flex; flex-direction: column; }
.cart-choice-body strong { color: var(--dark); }
.cart-choice-body small { color: #64748b; }
.cart-choice-price { font-weight: 700; color: var(--dark); white-space: nowrap; }
.cart-panel { margin-top: 1rem; padding: 1.25rem; border-radius: 16px; background: #f8fafc; }
.cart-search { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.cart-search .cart-input { max-width: 10rem; }
.cart-search .btn { border-radius: 12px; }
.cart-chosen { font-size: .9rem; margin: .75rem 0; }
.cart-summary { position: sticky; top: 1.5rem; background: #fff; border: 1px solid #eef2f7; border-radius: 24px; padding: 1.75rem; box-shadow: 0 12px 40px rgba(15, 23, 42, .06); }
.cart-summary h2 { font-weight: 800; font-size: 1.2rem; color: var(--dark); margin-bottom: 1rem; }
.cart-summary dl { margin: 0 0 .5rem; }
.cart-summary dl > div { display: flex; justify-content: space-between; padding: .35rem 0; color: #475569; }
.cart-summary dd { margin: 0; }
.cart-summary .cart-total { border-top: 1px solid #e2e8f0; margin-top: .5rem; padding-top: .9rem; color: var(--dark); font-weight: 800; font-size: 1.35rem; }
.cart-summary .pdp-add { flex: none; }
.orn-relay-widget:empty, .orn-relay-widget.is-failed { min-height: 0; }
.orn-relay-widget.is-failed { font-size: .9rem; color: #64748b; }
