/* ============================================================
   LabUP — charte graphique AdaptUP
   Vert #00CE75, encre #191716, fond crème #F9F7F5, police Sora.
   ============================================================ */
/* Les couleurs, rayons et ombres sont dans static/css/jetons.css,
   chargee avant cette feuille. Ne pas redefinir de valeur ici. */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Sora', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- En-tête --- */
/* Hauteur du bandeau : le remplissage vertical est a zero, c'est la
   hauteur minimale de .header-inner qui commande seule, sinon les deux
   s'additionnent. UNE seule valeur a changer, celle de min-height. */
.site-header {
    background: var(--ink);
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.brand span { color: var(--green); }

.nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.nav-user { color: #b9b6b0; font-size: 0.9rem; }

.nav-link { color: #ece9e4; text-decoration: none; font-size: 0.95rem; }
.nav-link:hover { color: #fff; text-decoration: underline; }

/* --- Boutons --- */
.btn {
    display: inline-block;
    background: var(--green);
    color: var(--ink);
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--green);
}

.btn-outline:hover { background: var(--green-lt); }

/* --- Hero --- */
.hero { padding: 3.5rem 0 2.5rem; }
.hero-sm { padding: 2rem 0 1.25rem; }

.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--ink);
    line-height: 1.15;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 48ch;
}

.hero-actions { margin-top: 1.75rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.status {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    background: var(--green-lt);
    color: var(--green-dark);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Cartes de modules --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.1rem;
    margin: 1.5rem 0 3rem;
}

.card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    transform: translateY(-3px);
    border-color: var(--green);
}

.card h3 { margin: 0 0 0.4rem; color: var(--ink); font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.badge {
    display: inline-block;
    margin-top: 0.7rem;
    padding: 0.15rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- États et notices --- */
.empty-state { padding: 2rem 0; }
.muted { color: var(--muted); }

.notice { border-radius: 14px; padding: 1rem 1.25rem; margin: 1rem 0; }
.notice-warning { background: var(--orange-lt); border: 1px solid #ffd98a; }
.notice-danger { background: var(--red-lt); border: 1px solid #ffc4c2; }

.message {
    border-radius: 12px;
    padding: 0.7rem 1rem;
    margin: 0.5rem 0;
    background: var(--green-lt);
    border: 1px solid var(--green-soft);
}

.message-error, .message-danger { background: var(--red-lt); border-color: #ffc4c2; }
.message-success { background: var(--green-lt); border-color: var(--green-soft); }

/* --- Pages de compte (allauth) --- */
.auth-wrap { display: flex; justify-content: center; padding: 2.5rem 1.25rem; }

.auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

.auth-card h1 { font-size: 1.5rem; margin: 0 0 1rem; color: var(--ink); font-weight: 700; }
.auth-card form { display: block; }

.auth-card label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.85rem 0 0.25rem;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg);
}

.auth-card input:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 206, 117, 0.15);
}

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: 1.3rem;
    background: var(--green);
    color: var(--ink);
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.auth-card button[type="submit"]:hover { background: var(--green-dark); }
.auth-card a { color: var(--green-dark); }
.auth-card ul { padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }
.auth-card .helptext { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.auth-card .errorlist { color: var(--red); list-style: none; padding: 0; font-size: 0.9rem; }

/* --- Tableau de bord établissement --- */
h2 { color: var(--ink); margin-top: 2rem; font-weight: 600; }

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin: 0.75rem 0 1.5rem;
}

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

.table th { background: var(--green-lt); font-size: 0.8rem; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.03em; }
.table tbody tr:last-child td { border-bottom: none; }
.table-actions { text-align: right; }

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    margin: 0 0 1.5rem;
    box-shadow: var(--shadow-card);
}

.panel h3 { margin: 0 0 0.25rem; color: var(--ink); font-weight: 600; }

.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.85rem; }

.inline-form input[type="email"],
.inline-form select {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg);
}

.inline-form input[type="email"] { min-width: 240px; flex: 1; }

.btn-link-danger {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 0;
    text-decoration: underline;
}

.nav-link-back { color: var(--green-dark); text-decoration: none; font-size: 0.95rem; }
.nav-link-back:hover { text-decoration: underline; }

/* --- Pages légales --- */
.legal { max-width: 720px; padding: 2rem 0 3rem; }
.legal h1 { color: var(--ink); font-weight: 700; }
.legal h2 { font-size: 1.15rem; margin-top: 1.75rem; }
.legal h3 { font-size: 1rem; font-weight: 700; margin-top: 1.4rem; margin-bottom: .35rem; }
.legal p { color: #33302c; }
.legal a { color: var(--green-dark); }

/* --- Pied de page --- */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* --- BibliUP : bibliothèque d'aides techniques --- */
.bib-search { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0 0 1rem; }
.bib-search input[type="search"] {
    flex: 1; min-width: 220px; padding: 0.65rem 1.1rem;
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    font: inherit; background: var(--white);
}
.bib-search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 206, 117, 0.15); }
.bib-filtres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }
.bib-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.35rem 0.85rem; border-radius: var(--radius-pill);
    border: 1.5px solid var(--border); background: var(--white);
    color: var(--ink); text-decoration: none; font-size: 0.85rem; font-weight: 500;
}
.bib-pill:hover { border-color: var(--green); background: var(--green-lt); }
.bib-pill-actif { background: var(--green); border-color: var(--green); }
.bib-count { background: var(--line); border-radius: var(--radius-pill); padding: 0 0.5rem; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.bib-pill-actif .bib-count { background: rgba(255, 255, 255, 0.55); color: var(--ink); }
.bib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; margin: 0.75rem 0 3rem; }
.bib-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-card); text-decoration: none; color: inherit;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.bib-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10); }
.bib-card-img { position: relative; aspect-ratio: 1 / 1; background: var(--line); }
.bib-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bib-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 0.85rem; }
.bib-badges { position: absolute; top: 0.6rem; right: 0.6rem; display: flex; gap: 0.3rem; }
.bib-badge {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 700; color: #fff;
}
.bib-badge-ok { background: var(--green); }
.bib-badge-labup { background: var(--ink); }
.bib-badge-fitup { background: #EC681C; }
.bib-notice {
    position: absolute; bottom: 0.6rem; right: 0.6rem;
    background: rgba(255, 255, 255, 0.95); border-radius: var(--radius-pill);
    padding: 0.15rem 0.6rem; font-size: 0.72rem; font-weight: 600;
}
.bib-card-body { padding: 1rem 1.1rem 1.2rem; }
.bib-card-body h3 { margin: 0 0 0.3rem; font-size: 1rem; font-weight: 600; }
.bib-card-body p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.85rem; }
.bib-card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.bib-tag { background: var(--green-lt); color: var(--green-dark); border-radius: var(--radius-pill); padding: 0.1rem 0.55rem; font-size: 0.72rem; font-weight: 600; }
/* --- BibliUP : fiche détail --- */
.bib-retour { margin: 1.25rem 0 0.5rem; }
.bib-fiche { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem; align-items: start; margin: 0.5rem 0 2rem; }
@media (max-width: 760px) { .bib-fiche { grid-template-columns: 1fr; } }
.bib-fiche-photo {
    position: relative; overflow: hidden; aspect-ratio: 1 / 1;
    border: 1px solid var(--border); border-radius: var(--radius-card);
    background: var(--line);
}
.bib-fiche-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bib-licence {
    position: absolute; bottom: 0.75rem; right: 0.75rem;
    background: rgba(255, 255, 255, 0.92); border-radius: var(--radius-pill);
    padding: 0.2rem 0.7rem; font-size: 0.78rem; font-weight: 600;
}
.bib-fiche-infos h1 { margin: 0.5rem 0; font-size: 1.7rem; line-height: 1.2; }
.bib-dl { margin-top: 1.25rem; }
.bib-dl .btn { display: block; text-align: center; margin: 0.5rem 0; }
/* Fiche : le fichier pret a imprimer en bouton plein (couleur de .btn), le STL en
   bouton secondaire a contour. Pas d'orange : il evoquerait un risque. */
.bib-btn-stl { background: #fff; color: var(--green-dark); box-shadow: inset 0 0 0 2px var(--green); }
.bib-btn-stl:hover { background: var(--green-lt); color: var(--green-dark); }
.bib-dl-off {
    display: block; text-align: center; margin: 0.5rem 0;
    padding: 0.65rem 1.3rem; border-radius: var(--radius-pill);
    background: var(--line); color: var(--muted); font-weight: 600; font-size: 0.95rem;
}
.bib-btn-video { display: block; width: 100%; text-align: center; margin-top: 0.75rem; }
.bib-video-modal {
    border: none; border-radius: var(--radius-card); padding: 0;
    width: min(860px, 92vw); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.bib-video-modal::backdrop { background: rgba(0, 0, 0, 0.75); }
.bib-video-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1rem; font-weight: 600; }
.bib-video-modal-head button { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
.bib-video-modal-head button:hover { color: var(--ink); }
.bib-video-modal video { width: 100%; display: block; }
.bib-infos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; margin: 0.75rem 0 1.5rem; }
.bib-info { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 0.8rem 1rem; }
.bib-info-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.15rem; }
.bib-info-val { font-weight: 600; }

/* --- BibliUP : favoris --- */
.bib-card-wrap { position: relative; scroll-margin-top: 90px; }
.bib-card-wrap .bib-card { height: 100%; }
.bib-fav-form { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 3; margin: 0; }
.bib-fav {
    width: 34px; height: 34px; border: none; border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem; line-height: 1; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s;
}
.bib-fav:hover { transform: scale(1.15); }
.bib-fiche-titre { display: flex; align-items: center; gap: 0.75rem; }
.bib-fiche-titre h1 { flex: 1; }
.bib-fiche-titre .bib-fav-form { position: static; }
.bib-pill-fav.bib-pill-actif { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.bib-pill-fav.bib-pill-actif .bib-count { background: rgba(255, 255, 255, 0.35); color: #fff; }

/* --- BibliUP : avis --- */
.bib-etoiles { color: #FFB330; letter-spacing: 2px; }
.bib-etoile-vide { color: #ddd; }
.bib-etoiles-sm { font-size: 0.85rem; letter-spacing: 1px; }
.bib-avis-moyenne { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0 1rem; font-size: 1.05rem; }
.bib-avis-form { display: grid; gap: 0.6rem; margin: 0 0 1rem; }
.bib-avis-form textarea {
    padding: 0.6rem 0.9rem; border: 1px solid var(--border);
    border-radius: 14px; font: inherit; resize: vertical; background: var(--white);
}
.bib-avis-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 206, 117, 0.15); }
.bib-avis-form .btn { justify-self: start; }
.bib-note-choix { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.bib-note-choix input { display: none; }
.bib-note-choix label { font-size: 1.7rem; line-height: 1; color: #ddd; cursor: pointer; transition: color 0.1s; }
.bib-note-choix input:checked ~ label,
.bib-note-choix label:hover,
.bib-note-choix label:hover ~ label { color: #FFB330; }
.bib-avis-item { border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 0.75rem; }
.bib-avis-tete { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.9rem; }
.bib-avis-item p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* --- BibliUP : merci sur la carte du dernier objet (chantier interface, lot C, suite) --- */
.bib-card-wrap.bib-dernier .bib-card { box-shadow: 0 0 0 3px var(--green), 0 8px 24px rgba(0, 206, 117, 0.22); }
.bib-merci-ruban { position: absolute; left: 0.75rem; bottom: 0.75rem; z-index: 2; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.75rem; border-radius: 999px; background: #fff; color: var(--ink); font-size: 0.8rem; font-weight: 600; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
.bib-merci-ruban svg { display: block; width: 14px; height: 14px; flex: none; }

/* --- BibliUP : bouton fitUP --- */
.bib-btn-fitup {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: #EC681C; margin-top: 0.75rem; width: 100%;
}
.bib-btn-fitup:hover { background: #EC681C; filter: brightness(0.92); }
.bib-btn-fitup img { width: 22px; height: 22px; }
.bib-pill-ico { width: 16px; height: 16px; }
.bib-edit { font-size: 1.1rem; text-decoration: none; margin-left: 0.25rem; }

/* --- BibliUP : formulaire de contribution --- */
.bib-form { max-width: 760px; margin: 0 0 3rem; }
.bib-form .panel { margin-bottom: 1.25rem; }
.bib-champ { margin: 0 0 0.9rem; display: flex; flex-direction: column; gap: 0.3rem; }
.bib-champ label { font-weight: 600; font-size: 0.9rem; }
.bib-champ label small { font-weight: 400; color: var(--muted); }
.bib-champ input[type="text"], .bib-champ input[type="number"],
.bib-champ textarea, .bib-champ select {
    padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: 14px;
    font: inherit; background: var(--white); width: 100%;
}
.bib-champ input:focus, .bib-champ textarea:focus, .bib-champ select:focus {
    outline: none; border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 206, 117, 0.15);
}
.bib-champ input[type="file"] { font-size: 0.9rem; }
.bib-champ .errorlist { color: #c0392b; margin: 0; padding-left: 1.1rem; font-size: 0.85rem; }
.bib-form-erreurs {
    background: #fdecea; border: 1px solid #f5c6c2; border-radius: 14px;
    padding: 0.75rem 1rem; margin-bottom: 1rem; color: #c0392b;
}
.bib-duree { display: flex; gap: 0.75rem; }
.bib-duree .bib-champ { flex: 1; }
.bib-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; margin: 0 0 0.5rem; cursor: pointer; }
.bib-check input { width: 18px; height: 18px; accent-color: var(--green); }
.bib-form-tags label { font-weight: 400; font-size: 0.9rem; display: flex; align-items: center; gap: 0.45rem; }
.bib-form-tags > label { font-weight: 600; }
.bib-form-tags div, .bib-form-tags ul {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.25rem;
}
.bib-form-tags input { accent-color: var(--green); }

/* --- BibliUP : boîte à idées --- */
.bib-btn-idees { margin-left: auto; }
.bib-btn-ajout { margin-left: 0; }
.bib-idees { max-width: 760px; margin: 0 0 3rem; display: grid; gap: 1rem; }
.bib-idee {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-card); scroll-margin-top: 90px;
}
.bib-idee-top { border-left: 4px solid #f1c40f; }
.bib-idee-tete { display: flex; align-items: center; gap: 0.6rem; }
.bib-idee-tete h3 { margin: 0; font-size: 1.05rem; flex: 1; }
.bib-idee-badge {
    background: #f1c40f; color: #fff; border-radius: var(--radius-pill);
    padding: 0.15rem 0.6rem; font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.bib-idee-photo { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 0.6rem; }
.bib-idee-desc { color: var(--muted); font-size: 0.92rem; margin: 0.5rem 0; }
.bib-idee-meta { display: flex; align-items: center; gap: 0.6rem; margin: 0.5rem 0 0.75rem; font-size: 0.85rem; }
.bib-idee-actions { display: flex; align-items: center; gap: 0.5rem; }
.bib-vote {
    border: 1.5px solid var(--border); background: var(--white);
    border-radius: var(--radius-pill); padding: 0.35rem 0.9rem;
    font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.bib-vote:hover { border-color: var(--green); background: var(--green-lt); }
.bib-vote-actif { background: var(--green); border-color: var(--green); }
.bib-idee-suppr { border: none; background: none; font-size: 1.05rem; cursor: pointer; opacity: 0.6; }
.bib-idee-suppr:hover { opacity: 1; }
.bib-idee-form { max-width: 760px; margin: 0 0 1.25rem; }
.bib-idee-form summary { display: inline-flex; cursor: pointer; list-style: none; }
.bib-idee-form summary::-webkit-details-marker { display: none; }
.bib-idee-form[open] summary { margin-bottom: 0.75rem; }
.bib-idee-form .panel { margin: 0; }

/* ===== Module tutoriels (phase 9) ===== */
.tuto-anchor { position: absolute; top: 0; visibility: hidden; }
.tuto-filtres { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.tuto-pill { display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 25px; border: 2px solid #e0e0e0;
  background: #fff; font-size: 13px; font-weight: 500; color: #636e72;
  text-decoration: none; transition: all .2s; }
.tuto-pill:hover { border-color: #00CE75; background: #f0fff8; }
.tuto-pill.active { background: linear-gradient(135deg, #00CE75, #00B894);
  border-color: #00CE75; color: #fff; }
.tuto-count { background: #e9ecef; color: #636e72; padding: 1px 8px;
  border-radius: 12px; font-size: 11px; font-weight: 600; }
.tuto-pill.active .tuto-count { background: rgba(255,255,255,.3); color: #fff; }
.tuto-grille { display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px; align-items: start; margin-top: 10px; }
.tuto-carte { background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none;
  color: inherit; display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s; }
.tuto-carte:hover { transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0,0,0,.14); }
.tuto-vignette { position: relative; aspect-ratio: 16/9; background: #000;
  overflow: hidden; }
.tuto-vignette img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s; }
.tuto-carte:hover .tuto-vignette img { transform: scale(1.05); }
/* La couleur du badge vient de Tag.couleur, posee en style inline par le
   gabarit. Le gris ci-dessous n'est qu'un repli pour un tag sans couleur.
   Les quatre variantes .tuto-badge-<tag> qui figuraient ici etaient sans
   effet : cette regle, de meme specificite, passait apres elles. */
.tuto-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px;
  border-radius: 14px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(99,110,114,.92); }
.tuto-badge-short { position: absolute; top: 10px; right: 10px;
  background: rgba(255,107,107,.95); padding: 4px 10px; border-radius: 14px;
  font-size: 11px; font-weight: 700; color: #fff; }
.tuto-play { position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-size: 26px;
  color: #00CE75; }
.tuto-play::before { content: ""; position: absolute; width: 54px;
  height: 54px; border-radius: 50%; background: rgba(255,255,255,.95);
  box-shadow: 0 4px 18px rgba(0,0,0,.3); z-index: -1;
  transition: transform .25s; }
.tuto-carte:hover .tuto-play::before { transform: scale(1.12); }
.tuto-corps { padding: 14px 16px; }
.tuto-corps h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.tuto-corps p { margin: 6px 0 0; font-size: 13px; color: #636e72; }
.tuto-modale { display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.92); z-index: 10001; align-items: center;
  justify-content: center; padding: 20px; }
.tuto-modale:target { display: flex; }
.tuto-modale-fond { position: absolute; inset: 0; }
.tuto-modale-contenu { position: relative; background: #000;
  border-radius: 14px; overflow: hidden; width: 100%; }
.tuto-modale-contenu.horizontal { max-width: 900px; aspect-ratio: 16/9; }
.tuto-modale-contenu.vertical { max-width: 380px; aspect-ratio: 9/16;
  max-height: 85vh; }
.tuto-modale-contenu iframe, .tuto-modale-contenu video { width: 100%;
  height: 100%; border: none; display: block; }
.tuto-modale-fermer { position: absolute; top: 6px; right: 12px;
  color: #fff; font-size: 34px; text-decoration: none; z-index: 2;
  text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.tuto-tag-point { display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; }
/* Astuces du bandeau d'accueil, listees ici en permanence (lot C).
   Aucun JavaScript : la modale reutilise le :target des videos. */
.tuto-vignette.astuce { background: linear-gradient(135deg, #a575ff, #7d4ce0); }
.tuto-vignette.astuce.vide::after { content: "💡"; position: absolute;
  inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 44px; }
.tuto-modale-contenu.texte { background: #fff; color: #2d3436;
  max-width: 680px; max-height: 85vh; overflow-y: auto; padding: 26px 30px; }
.tuto-modale-contenu.texte h2 { margin: 0; font-size: 20px;
  padding-right: 34px; }
.tuto-modale-contenu.texte .astuce-precision { margin: 4px 0 14px;
  font-size: 13px; color: #636e72; }
.tuto-modale-contenu.texte p { font-size: 15px; line-height: 1.6; }
.tuto-modale-contenu.texte img { display: block; width: 100%;
  border-radius: 10px; margin: 0 0 14px; }
.tuto-modale-contenu.texte .tuto-modale-fermer { color: #636e72;
  text-shadow: none; }

/* --- Module matériaux (phase 10, session 5) ------------------------------ */
.mat-qte { width: 5.5rem; }
.mat-form .btn { margin-right: 0.75rem; }

/* --- Qualification réglementaire (phase 11, session 11.2) --- */
.bib-badge-dm { background: #1668a7; }
.bib-notice-dm {
    border-left: 4px solid #1668a7;
    background: #eef5fb;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 12px 0;
}
.bib-dl-avertissement {
    font-size: 0.85em;
    color: #555;
    margin: 4px 0 10px;
}


/* --- PildiUP : vues métier (liste et fiche dossier) --- */
.pil-pill { display: inline-block; padding: 0.12rem 0.65rem; border-radius: var(--radius-pill); font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.pil-regime-DMSM { background: var(--green-lt); color: var(--green-dark); }
.pil-regime-DMIH { background: #eef5fb; color: #1668a7; }
.pil-regime-HORS_DM { background: var(--line); color: var(--muted); }
.pil-regime-CE_REQUIS { background: var(--red-lt); color: var(--red); }
.pil-regime-NA { background: var(--orange-lt); color: #8a5b00; }
.pil-etat { background: var(--line); color: var(--muted); }
.pil-etat-NOUVEAU { background: var(--orange-lt); color: #8a5b00; }
.pil-etat-REMISE, .pil-etat-EN_SERVICE { background: var(--green-lt); color: var(--green-dark); }
.pil-etat-BLOQUE, .pil-etat-RETIRE, .pil-etat-RAPPELE { background: var(--red-lt); color: var(--red); }
.pil-lien a { color: var(--ink); font-weight: 600; text-decoration: none; }
.pil-lien a:hover { color: var(--green-dark); text-decoration: underline; }
.pil-meta { color: var(--muted); font-size: 0.82rem; margin-bottom: 0; }
.pil-pagination { display: flex; gap: 1rem; align-items: center; margin: 1.2rem 0; }
.pil-pagination a { color: var(--green-dark); text-decoration: none; }
.pil-pagination a:hover { text-decoration: underline; }
.pil-reponses summary { cursor: pointer; color: var(--green-dark); font-size: 0.9rem; }
.pil-reponses ul { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; }
.pil-pills-titre { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.4rem 0 1rem; }
.bib-infos-grid .bib-info-val { overflow-wrap: anywhere; }

/* --- PildiUP S6 : barre de navigation du module --- */
.pil-nav { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 1.25rem 0 0.75rem; }
.pil-nav a.nav-link-back {
    display: inline-flex; align-items: center;
    padding: 0.4rem 0.95rem; border-radius: var(--radius-pill);
    border: 1.5px solid var(--border); background: var(--white);
    color: var(--ink); font-size: 0.9rem; font-weight: 600;
    text-decoration: none;
}
.pil-nav a.nav-link-back:hover {
    border-color: var(--green); background: var(--green-lt);
    text-decoration: none;
}

/* --- PildiUP S6 : lexique --- */
.pil-lexique { margin: 0; }
.pil-lexique dt { font-weight: 600; margin-top: 0.9rem; }
.pil-lexique dt:first-child { margin-top: 0; }
.pil-lexique dd { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* --- PildiUP S6 : formulaires (rythme vertical, champs) --- */
.form-row { margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.3rem; max-width: 560px; }
.form-row label { font-weight: 600; font-size: 0.9rem; }
.form-row input[type="text"], .form-row input[type="number"],
.form-row input[type="email"], .form-row input[type="url"],
.form-row input[type="date"], .form-row textarea, .form-row select {
    padding: 0.6rem 0.9rem; border: 1px solid var(--border);
    border-radius: var(--radius-input); font: inherit;
    background: var(--white); width: 100%;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    outline: none; border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 206, 117, 0.15);
}
.form-row input[type="file"] { font-size: 0.9rem; }
.form-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); }
.form-row:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 0.5rem; }
.form-row .muted { font-size: 0.85rem; margin: 0; }
.form-row .errorlist { color: var(--red); margin: 0; padding-left: 1.1rem; font-size: 0.85rem; }

/* --- PildiUP S6 : guide utilisateur --- */
.pg-hero { background: var(--green-lt); border: 1.5px solid var(--green-soft); border-radius: var(--radius-card); padding: 1.5rem 1.75rem; font-size: 1.15rem; font-weight: 600; margin: 1rem 0 2rem; }
.pg-flow { display: flex; flex-direction: column; gap: 0; max-width: 560px; margin: 1rem 0 1rem; }
.pg-step { background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; padding: 0.85rem 1.1rem; box-shadow: var(--shadow-card); }
.pg-step strong { display: block; margin-bottom: 0.15rem; }
.pg-step .muted { font-size: 0.9rem; }
.pg-arrow { text-align: center; color: var(--green-dark); font-size: 1.4rem; line-height: 1; padding: 0.3rem 0; max-width: 560px; }
.pg-issues { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin: 0.5rem 0 1.5rem; }
.pg-issue { border-radius: 14px; padding: 0.9rem 1rem; border: 1.5px solid var(--border); background: var(--white); }
.pg-issue h4 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.pg-issue p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.pg-issue-vert { border-color: var(--green-soft); background: var(--green-lt); }
.pg-issue-bleu { border-color: #bcd7ec; background: #eef5fb; }
.pg-issue-gris { background: var(--line); }
.pg-issue-rouge { border-color: #ffc4c2; background: var(--red-lt); }
.pg-frise { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.5rem; margin: 1rem 0; }
.pg-frise .pg-step { flex: 1; min-width: 160px; }
.pg-frise-arrow { color: var(--green-dark); font-size: 1.4rem; align-self: center; }
.pg-bulle { position: relative; background: var(--white); border: 1.5px solid var(--green); border-radius: 18px; padding: 0.9rem 1.2rem; margin: 1.25rem 0 1.25rem 1.25rem; max-width: 620px; }
.pg-bulle::before { content: ""; position: absolute; left: -16px; top: 16px; border: 8px solid transparent; border-right-color: var(--green); }
.pg-bulle strong { color: var(--green-dark); }
.pg-danger { border-color: var(--red); }
.pg-danger::before { border-right-color: var(--red); }
.pg-danger strong { color: var(--red); }


/* Lot 0 (18/07/2026) : l'état des documents sur la fiche dossier */
.pil-doc-etat { display: inline-block; padding: .15rem .55rem;
  border-radius: 999px; font-size: .85em; white-space: nowrap; }
.pil-doc-BROUILLON, .pil-doc-VALIDE { background: #fff3e0; color: #9a5b00;
  border: 1px solid #f0c27a; }
.pil-doc-VERROUILLE { background: #e6f4ea; color: #1e7b34;
  border: 1px solid #9fd3ac; }
.pil-doc-SUPERSEDE { background: #eeeeee; color: #666666;
  border: 1px solid #cccccc; }


/* Lot 2 (2.7) : l'ecran de qualification, titres et sous-titres. */
.pil-question { margin-bottom: 1.1rem; }
.pil-question-titre { display: block; font-size: 1.05rem; font-weight: 600; margin-bottom: .15rem; }
.pil-question-aide { margin: 0 0 .5rem; font-size: .9rem; }
.pil-question-rare { margin: .8rem 0 1rem; }
.pil-question-rare summary { cursor: pointer; color: #667; font-size: .95rem; }

/* Lot 6.3 : le menu du module PildiUP, en onglets */
.pil-menu { display: flex; flex-wrap: wrap; align-items: flex-end;
  margin: 0 0 1.6rem; border-bottom: 2px solid var(--green-dark); }
.pil-menu a { color: var(--ink); text-decoration: none;
  padding: 0.45rem 0.85rem; font-size: 0.95rem;
  border-radius: 8px 8px 0 0; }
.pil-menu a:hover { background: rgba(0, 0, 0, 0.06); }
.pil-menu a.actif { background: var(--green-dark); color: #fff;
  font-weight: 600; }
.pil-menu .pil-menu-aide { margin-left: auto; }
.pil-menu .pil-menu-aide a { color: #667; font-size: 0.9rem; }

/* 7.3 : les ancres du guide pildiUP, sous la barre fixe (pastille d'aide retiree) */
#parcours, #documents, #vie-en-service, #roles, #reflexes,
#machines, #reclamations, #revues, #declarations { scroll-margin-top: 90px; }

/* 7.4 : formulaires, blocs moins massifs, titres remontes, selects alignes */
form .panel { padding: 1.1rem 1.35rem; }
form .panel h2 { margin: 0 0 0.9rem; font-size: 1.25rem; }
.form-row select, .bib-champ select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23556b62' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center;
  padding-right: 2.4rem;
}

/* 7.5 : l'ecran reglementaire, titres nets, articles en repli */
.panel h2 { margin: 0 0 0.6rem; font-size: 1.3rem; }
.reg-pourquoi { margin: 0.3rem 0 0; }
.reg-pourquoi summary { cursor: pointer; list-style: none; color: var(--green-dark);
  font-weight: 600; font-size: 0.85rem; }
.reg-pourquoi summary::-webkit-details-marker { display: none; }
.reg-pourquoi summary:hover { text-decoration: underline; }
.reg-pourquoi p { margin: 0.35rem 0 0; font-size: 0.85rem; }

/* 7.8b : de l'air entre les boutons d'action des tableaux */
.table td .btn { margin: 0.15rem 0.35rem 0.15rem 0; }

/* Entete : hauteur unique sur tout le site, et logo en image au lieu du
   texte Lab + UP. La barre mesure 64px : le remplissage vertical de
   .site-header est a zero, seule cette hauteur minimale compte.
   Le logo de 32px garde donc 16px d'air en haut et en bas.
   Ces deux regles venaient de entete.css, que base.html ne charge plus ;
   entete.css sert desormais aux seules pages autonomes, et porte les
   MEMES valeurs : toute modification ici est a reporter la-bas, jusqu'au
   socle commun du lot A. */
.site-header .header-inner { min-height: 64px; }
.site-header .brand img { height: 32px; width: auto; display: block; flex: 0 0 auto; }

/* Reserve toujours la place de la barre de defilement, sinon le logo
   et le contenu se decalent de quelques pixels entre une page longue
   et une page courte. */
html { scrollbar-gutter: stable; }

/* --- Inscription S6 : formulaire public par étapes (v2) --- */
.inscription { max-width: 760px; }
.ins-erreur { background: var(--red-lt); border: 1.5px solid var(--red); border-radius: var(--radius-card); padding: 0.85rem 1.1rem; }
.ins-progression { margin: 1.5rem 0 0.75rem; }
.ins-progression-texte { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }
.ins-etape-num { font-size: 0.85rem; font-weight: 600; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.ins-barre { height: 8px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.ins-barre-plein { height: 100%; width: 0; background: var(--green); border-radius: var(--radius-pill); transition: width 0.3s ease; }
.ins-bloc { border: 1.5px solid var(--border); border-radius: var(--radius-card); background: var(--white); padding: 1.25rem 1.5rem 0.5rem; margin: 1.5rem 0 0; box-shadow: var(--shadow-card); }
.ins-form.ins-js .ins-bloc { margin-top: 0; }
.ins-form.ins-js .ins-etape:not(.ins-active) { display: none; }
.ins-titre { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin: 0 0 1rem; padding-bottom: 0.75rem; border-bottom: 3px solid var(--green); line-height: 1.2; }
.ins-req { color: var(--red); font-weight: 700; }
.ins-sous-titre { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 1.25rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ins-sous-titre-premier { margin-top: 0; padding-top: 0; border-top: 0; }
.ins-intro { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }
.ins-depend[hidden] { display: none; }
.ins-progression[hidden], .ins-actions .btn[hidden] { display: none; }
.ins-bloc .form-row { max-width: none; }
.ins-bloc .form-row textarea { min-height: 5.5rem; resize: vertical; }
.ins-bloc .form-row input[type="tel"] { padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-input); font: inherit; background: var(--white); width: 100%; }
.ins-bloc .form-row:has(input[type="checkbox"]) label { font-weight: 500; }
.ins-bloc .form-row-erreur input, .ins-bloc .form-row-erreur select, .ins-bloc .form-row-erreur textarea { border-color: var(--red); }
.ins-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.ins-2col-cp { grid-template-columns: 1fr 2fr; }
.ins-rgpd { font-size: 0.85rem; color: var(--muted); margin: 1.25rem 0 0.75rem; }
.ins-actions { display: flex; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 1rem; }
.ins-actions .btn { font-size: 1rem; padding: 0.75rem 1.5rem; }
.ins-actions .ins-suivant, .ins-actions .ins-envoyer { margin-left: auto; }
.ins-actions .btn:disabled { opacity: 0.4; cursor: default; }
/* Recapitulatif, derniere etape du formulaire (session 22) */
.ins-form.ins-js .ins-recap-etape { border: 0; background: transparent; box-shadow: none; padding: 0; }
.ins-recap-bloc { border: 1.5px solid var(--border); border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-card); padding: 1rem 1.25rem 0.5rem; margin: 0 0 1rem; }
.ins-recap-tete { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--green); }
.ins-recap-titre { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0; }
.ins-recap-modifier { font-size: 0.85rem; padding: 0.35rem 0.9rem; }
.ins-recap-liste { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr; gap: 0.35rem 1.25rem; margin: 0 0 0.75rem; }
.ins-recap-liste dt { font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.ins-recap-liste dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.ins-recap-liste .ins-recap-sous-titre { grid-column: 1 / -1; color: var(--ink); font-weight: 700; font-size: 0.95rem; margin-top: 0.5rem; }
@media (max-width: 600px) {
  .ins-2col, .ins-2col-cp { grid-template-columns: 1fr; }
  .ins-recap-liste { grid-template-columns: 1fr; gap: 0.15rem; }
  .ins-recap-liste dd { margin-bottom: 0.5rem; }
  .ins-bloc { padding: 1rem 1rem 0.25rem; }
}

/* --- BibliUP : pastille fitUP en picto (chantier interface, lot A) --- */
.bib-badges img.bib-badge {
    width: 26px; height: 26px; max-width: 26px; max-height: 26px;
    flex: none; display: block; object-fit: contain; border-radius: 50%;
}

/* --- BibliUP : photo agrandie de la fiche (chantier interface, lot E) --- */
.bib-fiche-zoom { cursor: zoom-in; }
.bib-photo-modal { max-width: min(92vw, 1100px); }
.bib-photo-modal img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; object-fit: contain; }

/* --- BibliUP : cartes, tags en couleur et pastilles (chantier interface, lot C) --- */
.bib-badges { top: 0.5rem; right: 0.5rem; gap: 0.35rem; }
.bib-badges .bib-badge { position: relative; width: 26px; height: 26px; filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.35)); }
.bib-badges .bib-badge img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.bib-badges .bib-badge-fitup, .bib-badges .bib-badge-ok { background: transparent; }
.bib-badges .bib-badge-labup { background: #fff; }
.bib-badges .bib-badge-labup img { width: 68%; height: 68%; }
.bib-badges [data-infobulle]::after {
    content: attr(data-infobulle); position: absolute; top: calc(100% + 6px); right: 0; z-index: 5;
    background: #fff; color: var(--ink); padding: 0.35rem 0.6rem; border-radius: 8px;
    font-size: 0.75rem; font-weight: 500; white-space: nowrap; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0; visibility: hidden; transition: opacity 0.15s; pointer-events: none;
}
.bib-badges [data-infobulle]:hover::after { opacity: 1; visibility: visible; }
.bib-point { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* --- BibliUP : categories combinables et segment d'affichage (chantier interface, lot B) --- */
.bib-pill.bib-pill-actif, .bib-pill.bib-pill-actif:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.bib-pill-actif .bib-point { box-shadow: 0 0 0 2px #fff; }
.bib-pill.bib-pill-actif .bib-count { background: rgba(255, 255, 255, 0.2); color: #fff; }
.bib-ligne-compte { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem; margin: 0 0 1rem; }
.bib-ligne-compte p { margin: 0; }
.bib-segment { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: #ede8e2; }
.bib-segment-choix { display: flex; align-items: center; gap: 0.35rem; padding: 0.45rem 1rem; border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.bib-segment-choix:hover { background: rgba(255, 255, 255, 0.6); }
.bib-segment-choix.bib-segment-actif { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(25, 23, 22, 0.14); }
.bib-segment-choix img, .bib-segment-choix svg { display: block; width: 16px; height: 16px; flex: none; }

/* --- BibliUP : bouton fitUP facon Zoho (chantier interface, lot C, suite) --- */
.bib-btn-fitup { display: flex; align-items: center; justify-content: center; gap: 0.75rem; background: #EC681C; color: #fff; border: none; border-radius: 12px; padding: 0.85rem 1.25rem; font-size: 0.95rem; font-weight: 600; box-shadow: 0 6px 18px rgba(236, 104, 28, 0.28); }
.bib-btn-fitup:hover { color: #fff; }
.bib-btn-fitup .bib-btn-fitup-picto { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.bib-btn-fitup .bib-btn-fitup-picto img { display: block; width: 30px; height: 30px; }
.bib-btn-fitup-texte { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 5px; }
.bib-btn-fitup .bib-btn-fitup-logo { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; background: #191716; position: relative; top: -2px; }
.bib-btn-fitup .bib-btn-fitup-logo img { display: block; width: auto; height: 14px; }

/* --- BibliUP : barre de recherche sur une ligne (chantier interface, lot C, suite) --- */
.bib-search input[type="search"] { flex: 1 1 320px; }
.bib-search .bib-btn-idees { display: inline-flex; align-items: center; gap: 0.45rem; background: #FFF1CC; border: 1.5px solid #FFB330; color: var(--ink); }
.bib-search .bib-btn-idees:hover { background: #FFE7A8; border-color: #FFB330; color: var(--ink); }
.bib-search .bib-btn-idees svg { display: block; width: 18px; height: 18px; flex: none; }
.bib-search .bib-btn-ajout { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(25, 23, 22, 0.18); }
.bib-search .bib-btn-ajout:hover { background: #000; border-color: #000; color: #fff; }

/* --- BibliUP : objets non partages visibles de l'etablissement (chantier interface, lot D) --- */
.bib-badges .bib-badge-prive { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #191716; }
.bib-badges .bib-badge-prive svg { display: block; width: 14px; height: 14px; }
.bib-badges [data-infobulle]::after { white-space: normal; width: max-content; max-width: 190px; text-align: left; line-height: 1.3; }

/* Chantier interface bibliUP, lot I (1er octobre 2026) : formulaire "Ajouter un objet",
   d'apres la planche du canevas. Recapitulatif a droite, categories et matieres en cases,
   partage en deux grandes cases. */
.bib-form-grille { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 2rem; align-items: start; margin-bottom: 3rem; }
.bib-form-grille .bib-form { max-width: none; margin: 0; }
.bib-form fieldset { border: 0; padding: 0; margin: 0 0 0.9rem; min-width: 0; }
.bib-form legend { padding: 0; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9rem; }
.bib-form legend small { font-weight: 400; color: var(--muted); }
.bib-requis { color: #B3261E; }
.bib-aide { font-size: 0.85rem; color: var(--muted); }
.bib-cases { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.bib-case { min-height: 44px; box-sizing: border-box; padding: 0 0.9rem; border: 1.5px solid #DDD7D0; border-radius: 22px; background: #fff; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.bib-case:has(input:checked) { border-color: var(--green); background: #E3F5EA; }
.bib-case input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }
.bib-choix-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.bib-choix { padding: 0.9rem 1rem; border: 1.5px solid #DDD7D0; border-radius: 12px; background: #fff; display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; }
.bib-choix:has(input:checked) { border-color: var(--green); background: #E3F5EA; }
.bib-choix input { width: 18px; height: 18px; accent-color: var(--green); margin: 0.15rem 0 0; flex-shrink: 0; }
.bib-choix strong { display: block; font-size: 0.95rem; }
.bib-choix small { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.bib-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.9rem; }
.bib-note { margin: 0 0 0.9rem; padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.9rem; line-height: 1.5; }
.bib-note-alerte { background: #FDECEA; color: #7A1C14; }
.bib-note-info { background: #F3F0EC; color: #3d3935; }
.bib-champ[hidden], .bib-note[hidden] { display: none; }
.bib-recap { position: sticky; top: 1rem; background: #fff; border-radius: 16px; padding: 1.25rem; box-shadow: 0 1px 2px rgba(25,23,22,.06), 0 4px 14px rgba(25,23,22,.05); display: flex; flex-direction: column; gap: 0.9rem; }
.bib-recap h2 { margin: 0; font-size: 1rem; }
.bib-recap dl { margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.bib-recap dt { margin-top: 0.6rem; font-size: 0.75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bib-recap dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bib-recap dd small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.bib-recap p { margin: 0; padding-top: 0.8rem; border-top: 1px solid #E6E1DB; font-size: 0.85rem; color: var(--muted); }
@media (max-width: 900px) {
  .bib-form-grille { grid-template-columns: minmax(0, 1fr); }
  .bib-recap { position: static; }
}
@media (max-width: 600px) {
  .bib-choix-grille, .bib-deux { grid-template-columns: minmax(0, 1fr); }
}

/* Chantier interface bibliUP, lot I, tranchage demande : trois reponses a la question
   du fichier d'impression, et ce que chaque reponse masque (attribut hidden). */
.bib-choix-grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bib-form [hidden], .bib-recap [hidden] { display: none !important; }
@media (max-width: 760px) {
  .bib-choix-grille-3 { grid-template-columns: minmax(0, 1fr); }
}

/* Chantier interface bibliUP, lot I : pastille "En preparation" d'une demande de tranchage. */
.bib-badge-attente { background: #9a6200; }

/* Chantier interface bibliUP, lot I-e : fichiers deja joints, repris de sliceUP. */
.bib-fichier-repris { display: flex; gap: .6rem; align-items: flex-start; margin: .3rem 0 .2rem; padding: .6rem .8rem; border: 1px solid #2e7d32; border-radius: 8px; background: #eef7ee; }
.bib-fichier-repris svg { flex: none; width: 20px; height: 20px; margin-top: .1rem; }
.bib-fichier-repris strong { display: block; overflow-wrap: anywhere; }
.bib-fichier-repris small { display: block; color: #2f5233; }
.bib-remplacer { display: block; margin: .5rem 0 .2rem; font-size: .85rem; color: #555; }
.bib-fichier-repris[hidden], .bib-remplacer[hidden] { display: none; }

/* Chantier tutoriels, session 1 (1er octobre 2026). Un tutoriel avance vu
   par un abonne dont l'offre n'ouvre que la base : grise, sans modale, avec
   l'offre qui l'ouvre. La pastille Avance se voit de tous. */
.tuto-carte.verrouillee { cursor: default; }
.tuto-carte.verrouillee:hover { transform: none; }
.tuto-carte.verrouillee .tuto-vignette img { filter: grayscale(1); opacity: .55; }
.tuto-carte.verrouillee:hover .tuto-vignette img { transform: none; }
.tuto-carte.verrouillee .tuto-corps h3 { color: #636e72; }
.tuto-badge-avance { position: absolute; bottom: 10px; left: 10px; padding: 4px 10px;
  border-radius: 12px; background: #2d3436; color: #fff; font-size: 12px; font-weight: 600; }
.tuto-corps p.tuto-offre { color: #6B4405; font-weight: 600; }
