/* 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;
}

/* 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; }
