/* style.css — Commandes Livres BISP 2026/2027
   Inspiration : certificat BISP — élégance institutionnelle
   Palette : navy + or fin + blanc, typographie serif pour titres
*/

:root {
    /* Fonds */
    --bg:           #fdfcf9;       /* blanc cassé très subtil */
    --bg-soft:      #f7f5ef;
    --surface:      #ffffff;
    --surface-soft: #f5f3ed;

    /* Bordures */
    --border:       #e2dfd5;
    --border-soft:  #ece9df;
    --border-strong:#cbc6b6;

    /* Texte */
    --text:         #1a1a1a;
    --text-soft:    #4a4a4a;
    --muted:        #888379;

    /* Couleur signature — palette officielle bisparis.com */
    --navy:         #022c5e;       /* bleu nuit BISP (dominant 41 occurrences sur le site) */
    --navy-soft:    #1a437a;
    --navy-deep:    #001a3d;
    --navy-pale:    #e6e9ee;        /* officiel BISP */
    --navy-bg:      #eef1f7;

    /* Or fin (accent) — jaune doré BISP */
    --gold:         #f9cc70;        /* officiel BISP */
    --gold-deep:    #c89a3a;
    --gold-pale:    #fdf3d8;
    --gold-line:    #e8b94a;

    /* Sémantique */
    --success:      #2f6b3e;
    --success-bg:   #ebf3ed;
    --warning-bg:   #faf3e0;
    --warning-fg:   #8a6a1f;
    --error:        #8a2a2a;
    --error-bg:     #f5e6e6;

    /* Typo */
    --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif:   'Cormorant Garamond', 'Garamond', Georgia, 'Times New Roman', serif;

    --shadow-soft:  0 1px 3px rgba(31, 36, 84, 0.05);
    --shadow-card:  0 4px 16px rgba(31, 36, 84, 0.07);
    --radius:       2px;
    --radius-card:  3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

a { color: var(--navy); transition: color 0.2s; }
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4 {
    color: var(--navy);
    margin: 0 0 1rem;
}
h1 { font-family: var(--font-sans); font-weight: 500; font-size: 1rem; letter-spacing: 0.18em; text-transform: uppercase; }
h2 { font-family: var(--font-serif); font-weight: 500; font-size: 2rem; letter-spacing: 0.005em; line-height: 1.2; }
h3 { font-family: var(--font-sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--navy); font-weight: 600; }
h4 { font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; color: var(--gold-deep); }

/* ========== TOPBAR ========== */
.topbar {
    background: var(--navy);
    color: #fff;
    width: 100%;
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar h1 { margin: 0; padding: 0; font-family: var(--font-serif); font-size: inherit; text-transform: none; letter-spacing: 0; font-weight: 400; }
.topbar h1 a {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-name {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #fff;
}
.brand-sub {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--gold);
    margin-top: 0.3rem;
    font-weight: 500;
}
.topbar nav a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    transition: color 0.2s;
    font-weight: 500;
}
.topbar nav a:hover { color: var(--gold); }

/* Liseré or au-dessous de la topbar (rappel certificat) */
.topbar-rule {
    height: 3px;
    background: var(--gold);
    background: linear-gradient(90deg, transparent 0%, var(--gold) 20%, var(--gold) 80%, transparent 100%);
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 3rem auto;
    padding: 0 3rem;
    flex: 1;
}

/* ========== FOOTER (bottom line gold + BISP) ========== */
.sitefoot {
    margin-top: auto;
    background: var(--navy-deep);
    color: rgba(255,255,255,0.75);
}
.sitefoot-rule {
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 20%, var(--gold) 80%, transparent 100%);
}
.sitefoot-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.sitefoot-brand {
    font-family: var(--font-serif);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}
.sitefoot-meta {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gold);
    font-weight: 500;
}

/* ========== FLASH ========== */
.flash {
    padding: 0.95rem 1.4rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid;
    font-size: 0.92rem;
    background: var(--surface);
}
.flash-success { border-left-color: var(--success); color: var(--success); background: var(--success-bg); }
.flash-error   { border-left-color: var(--error);   color: var(--error);   background: var(--error-bg); }

/* ========== BUTTONS ========== */
.btn, button.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    background: var(--navy);
    color: #fff;
    border: 1px solid var(--navy);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.74rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--radius);
    font-weight: 600;
}
.btn:hover, button.btn:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.btn:disabled {
    background: var(--surface-soft);
    color: var(--muted);
    border-color: var(--border);
    cursor: not-allowed;
}

/* ========== HOME ========== */
.home-intro {
    text-align: center;
    color: var(--text-soft);
    margin: 1rem auto 3.5rem;
    max-width: 640px;
}
.home-intro p {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--navy);
}
.home-intro strong { color: var(--gold-deep); font-weight: 600; }

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.home-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 2.5rem 2.2rem;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    border-top: 3px solid var(--navy);
    position: relative;
}
.home-card::after {
    content: '';
    position: absolute;
    left: 2.2rem; right: 2.2rem;
    bottom: 4.5rem;
    height: 1px;
    background: var(--gold-line);
    opacity: 0.5;
}
.home-card:hover {
    border-color: var(--navy);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}
.home-card h2 {
    margin: 0 0 0.7rem;
    font-size: 1.7rem;
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: 0.005em;
}
.home-card p {
    margin: 0 0 1.8rem;
    color: var(--text-soft);
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.65;
}
.home-cta {
    color: var(--gold-deep);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    padding-top: 1.2rem;
}

/* ========== PAGE HEADERS ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.2rem;
    position: relative;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--gold);
}
.page-header h2 { margin: 0; }

/* ========== TABLES (admin) ========== */
.filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--surface);
    padding: 1rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.filters input[type="text"] {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.92rem;
    background: var(--surface);
}
.filters input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-pale);
}
.filters button {
    padding: 0.6rem 1.4rem;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.2s;
}
.filters button:hover { background: var(--gold); color: var(--navy); }
.filters label { color: var(--text-soft); display: flex; align-items: center; gap: 0.4rem; }

.livres-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.livres-table th, .livres-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
    vertical-align: middle;
}
.livres-table th {
    background: var(--surface-soft);
    color: var(--navy);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    border-bottom: 2px solid var(--gold-line);
}
.livres-table tbody tr:hover { background: var(--bg-soft); }
.livres-table tr:last-child td { border-bottom: none; }
.row-inactive { color: var(--muted); opacity: 0.65; }
.row-inactive strong { font-weight: 400; }
.cover-mini { max-height: 44px; max-width: 32px; border: 1px solid var(--border); }

.badge {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: var(--radius);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--surface-soft);
    color: var(--text-soft);
    border: 1px solid var(--border);
    font-weight: 500;
}
.badge-en_edition { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.badge-hors_commerce { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.badge-inconnu { background: var(--surface-soft); color: var(--muted); }

.actions a, .actions button.link {
    color: var(--navy);
    background: none;
    border: none;
    padding: 0;
    margin-right: 1rem;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.actions a:hover, .actions button.link:hover { color: var(--gold-deep); text-decoration: underline; }

/* ========== FORMS ========== */
.livre-form {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: var(--radius-card);
    max-width: 900px;
}
.form-row { margin-bottom: 1.4rem; display: flex; flex-direction: column; }
.form-row label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--navy);
}
.form-row input,
.form-row select,
.form-row textarea {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: all 0.15s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-pale);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1.5rem;
}
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.form-actions a {
    margin-left: 1.5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
}
.form-actions a:hover { color: var(--navy); }

#lookup-status { display: block; margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.lookup-success { color: var(--success); }
.lookup-warning { color: var(--warning-fg); }
.lookup-error   { color: var(--error); }

.empty {
    text-align: center;
    color: var(--muted);
    padding: 3.5rem 2rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ========== PROF WIZARD ========== */
body.prof-flow { background: var(--bg-soft); }

.wizard-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto 2.5rem;
    max-width: 920px;
    counter-reset: step;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.wizard-steps li {
    flex: 1;
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: var(--surface);
    transition: all 0.2s;
    border-right: 1px solid var(--border-soft);
    font-weight: 500;
}
.wizard-steps li:last-child { border-right: none; }
.wizard-steps .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--muted);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.78rem;
    flex-shrink: 0;
    font-family: var(--font-sans);
    letter-spacing: 0;
    transition: all 0.2s;
}
.wizard-steps li.current {
    color: var(--navy);
    background: var(--navy-bg);
    font-weight: 600;
}
.wizard-steps li.current .step-num {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.wizard-steps li.done {
    color: var(--gold-deep);
    background: var(--gold-pale);
}
.wizard-steps li.done .step-num {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 3rem 3.5rem;
    max-width: 920px;
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
    border-top: 3px solid var(--gold);
}
.step-card h2 {
    margin-top: 0;
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
    position: relative;
}
.step-card h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gold);
}

.instruction {
    color: var(--text);
    background: var(--gold-pale);
    border-left: 3px solid var(--gold);
    padding: 0.95rem 1.2rem;
    margin: 1.5rem 0;
    font-size: 0.94rem;
    line-height: 1.6;
}

.recap {
    background: var(--surface-soft);
    border-left: 3px solid var(--navy);
    padding: 0.9rem 1.2rem;
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: var(--text-soft);
}
.recap strong { color: var(--navy); font-weight: 600; }

.prof-grid, .niveau-grid, .matiere-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.prof-tile, .niveau-tile, .matiere-tile {
    padding: 1.4rem 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    text-align: center;
    transition: all 0.18s;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text);
}
.prof-tile:hover, .niveau-tile:hover, .matiere-tile:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
}
.prof-name { font-weight: 600; color: var(--navy); font-size: 1rem; font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; }
.prof-langue {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 500;
}
.niveau-fr {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--navy);
    letter-spacing: 0.02em;
}
.niveau-en {
    font-size: 0.72rem;
    color: var(--gold-deep);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
}
.matiere-tile {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    padding: 1.6rem 1rem;
}

.back-link {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
}
.back-link a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
}
.back-link a:hover { color: var(--navy); }

/* ========== PROF SECTIONS (à faire / déjà commencé) ========== */
.prof-section { margin-bottom: 2rem; }
.prof-section-done { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-soft); }

.section-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--navy);
    font-weight: 700;
    margin: 1.5rem 0 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.section-title-done { color: var(--muted); }
.section-hint {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.totaux {
    font-size: 0.78rem;
    color: var(--text-soft);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: auto;
}
.totaux strong { color: var(--gold-deep); font-weight: 600; }

.prof-tile-done {
    background: var(--surface-soft);
    border-color: var(--border-soft);
    opacity: 0.85;
}
.prof-tile-done .prof-name { color: var(--text-soft); font-weight: 500; }
.prof-tile-done .prof-langue { color: var(--muted); }
.prof-progress {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}
.prof-tile-done:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
    opacity: 1;
}

/* ========== COMMANDE PAGE ========== */
.commande-recap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem 2rem;
    background: var(--navy);
    color: #fff;
    padding: 1.5rem 1.8rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    border-bottom: 3px solid var(--gold);
}
.commande-recap > div { font-size: 0.92rem; color: rgba(255,255,255,0.85); }
.commande-recap strong { color: #fff; font-weight: 600; font-family: var(--font-serif); font-size: 1.1rem; }
.recap-label {
    color: var(--gold);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.explainer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-card);
    padding: 2rem 2.4rem;
    margin-bottom: 2rem;
}
.explainer h3 {
    margin-top: 0;
    color: var(--navy);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    border-bottom: 1px solid var(--gold-line);
    padding-bottom: 0.7rem;
    margin-bottom: 1.2rem;
}
.explainer p { margin: 0.7rem 0; font-size: 0.93rem; line-height: 1.7; color: var(--text); }
.rules {
    padding-left: 1.4rem;
    margin: 1rem 0 0;
    counter-reset: rule;
    list-style: none;
}
.rules li {
    margin-bottom: 1rem;
    line-height: 1.65;
    font-size: 0.93rem;
    position: relative;
    padding-left: 0.5rem;
    counter-increment: rule;
}
.rules li::before {
    content: counter(rule);
    position: absolute;
    left: -1.7rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--navy);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 1.5rem;
    font-size: 0.78rem;
    font-weight: 700;
}
.rules ul { margin: 0.5rem 0 0; padding-left: 1.2rem; list-style: disc; }
.rules em { color: var(--gold-deep); font-style: normal; font-weight: 600; }
.rules strong { color: var(--navy); }

.commande-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
}
.commande-actions button.link, .commande-actions a.link {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.74rem;
    text-decoration: none;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0;
    font-weight: 500;
}
.commande-actions button.link:hover, .commande-actions a.link:hover { color: var(--gold-deep); }

/* ========== LIGNE FORM (saisie livre — 3 blocs) ========== */
.ligne-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 0;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

/* Bloc 1 : ISBN — héro navy avec liseré gold */
.isbn-block {
    background: var(--navy);
    color: #fff;
    padding: 1.7rem 1.8rem;
    border-bottom: 2px solid var(--gold);
}
.isbn-label {
    display: block;
    color: var(--gold);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    margin-bottom: 0.7rem;
}
.isbn-block input {
    width: 100%;
    padding: 0.95rem 1.1rem;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255,255,255,0.2);
    background: #fff;
    color: var(--navy);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s;
}
.isbn-block input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,169,107,0.35);
}
.lookup-status {
    display: block;
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    min-height: 1.2em;
}
.lookup-status.lookup-success { color: #b5d8be; }
.lookup-status.lookup-warning { color: var(--gold); }
.lookup-status.lookup-error   { color: #e9b1ad; }

.autofill-block, .quantites-block {
    padding: 1.5rem 1.8rem;
    border-top: 1px solid var(--border-soft);
    background: var(--surface);
}

.autofill-hint {
    margin: 0 0 1rem;
    color: var(--navy);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
}

.ligne-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem 1.2rem;
}
.ligne-form-grid .form-row { margin-bottom: 0; }
.ligne-form-grid .span-2 { grid-column: span 2; }
.ligne-form-grid .span-3 { grid-column: span 3; }

.qte-grid {
    display: grid;
    grid-template-columns: 160px 160px 1fr;
    gap: 0.8rem 1.2rem;
    align-items: end;
}
.qte-cell input {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    font-weight: 600;
}
.qte-highlight input,
td.qte-highlight strong {
    background: var(--gold-pale) !important;
    border-color: var(--gold) !important;
    color: var(--navy);
    font-weight: 700;
}
.qte-highlight input:focus {
    box-shadow: 0 0 0 2px var(--gold-pale) !important;
}
.qte-notes-row { grid-column: 3; }

.ligne-form-actions {
    padding: 1.2rem 1.8rem;
    background: var(--surface-soft);
    border-top: 1px solid var(--border-soft);
    text-align: right;
}

/* ========== LIGNES TABLE (commande prof) ========== */
.lignes-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.lignes-table th, .lignes-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.9rem;
    vertical-align: middle;
}
.lignes-table th {
    background: var(--surface-soft);
    color: var(--navy);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    border-bottom: 2px solid var(--gold-line);
}
.lignes-table th.num, .lignes-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lignes-table tbody tr:hover { background: var(--bg-soft); }
.lignes-table tr:last-child td { border-bottom: none; }
.lignes-table .muted { color: var(--muted); }
.ligne-meta { font-size: 0.82rem; color: var(--text-soft); }
.ligne-notes { font-size: 0.85rem; color: var(--text-soft); font-style: italic; }
.lignes-table .qte-highlight { background: var(--gold-pale); }
.lignes-table .qte-highlight strong { color: var(--navy); font-size: 1.05rem; }

/* Couvertures dans le tableau */
.cover-cell { width: 50px; padding: 0.5rem; }
.cover-thumb {
    display: block;
    width: 38px;
    height: 56px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--surface-soft);
}
.cover-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--muted);
    background: var(--surface-soft);
}

/* Total row */
.total-row td {
    background: var(--navy) !important;
    color: #fff !important;
    border-top: 2px solid var(--gold);
    border-bottom: none !important;
    padding: 1rem !important;
}
.total-row .total-label {
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold) !important;
}
.total-row strong {
    color: #fff !important;
    font-size: 1.15rem !important;
}
.total-row .total-cmd {
    color: var(--gold) !important;
    font-size: 1.4rem !important;
    font-family: var(--font-serif);
    font-weight: 600 !important;
}
.total-row .qte-highlight {
    background: rgba(249, 204, 112, 0.15) !important;
}

/* Cover preview dans le form (gros aperçu après lookup) */
.autofill-flex {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.autofill-fields { flex: 1; min-width: 0; }
.cover-preview {
    width: 110px;
    height: 160px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.cover-preview .cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cover-placeholder {
    font-size: 2.5rem;
    color: var(--muted);
    opacity: 0.5;
}
.cover-preview.has-cover {
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(20, 37, 58, 0.12);
}

.form-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
    margin-top: 1rem;
}
.form-row-pair .form-row { margin-bottom: 0; }

/* Citation : transition fade */
.citation-inner { transition: opacity 0.6s ease-in-out; }

/* ========== ADMIN LOGIN ========== */
.login-card {
    max-width: 460px;
    margin: 3rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
}
.login-card h2 {
    margin: 0 0 0.5rem;
    text-align: center;
}
.login-hint {
    text-align: center;
    color: var(--text-soft);
    margin: 0 0 2rem;
    font-size: 0.92rem;
}
.login-form .form-actions {
    margin-top: 1.5rem;
    text-align: center;
}

/* ========== BISP TOME — open book illustration ========== */
.home-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.home-hero .home-intro {
    margin: 0;
    text-align: left;
    max-width: 460px;
}

.bisp-tome {
    width: 320px;
    flex-shrink: 0;
    position: relative;
    /* Subtle breathing animation on the whole tome */
    animation: tomeBreath 7s ease-in-out infinite;
    transform-origin: center center;
    filter: drop-shadow(0 18px 28px rgba(0, 12, 38, 0.18));
}

@keyframes tomeBreath {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-4px) scale(1.012); }
}

.bisp-tome-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* Animated pages — each turns slowly with eased rotation */
.bisp-tome-page {
    transform-origin: 160px 122px;  /* spine center in viewBox coords */
    animation: tomePageTurn 9s ease-in-out infinite;
    animation-delay: var(--page-delay, 0s);
    transform-box: fill-box;
    transform-origin: left center;
}

/* Use viewBox-based origin for SVG groups (transform-box: fill-box) */
.bisp-tome-page {
    transform-box: view-box;
    transform-origin: 160px 122px;
}

@keyframes tomePageTurn {
    0%               { transform: rotateY(0deg);    opacity: 1; }
    8%               { transform: rotateY(-3deg);   opacity: 1; }
    35%              { transform: rotateY(-180deg); opacity: 1; }
    36%              { transform: rotateY(-180deg); opacity: 0; }
    100%             { transform: rotateY(-180deg); opacity: 0; }
}

/* Stagger pages with proper z-stacking + reset cycle */
.bisp-tome-page:nth-of-type(1) { animation-name: tomePageTurn1; }
.bisp-tome-page:nth-of-type(2) { animation-name: tomePageTurn2; }
.bisp-tome-page:nth-of-type(3) { animation-name: tomePageTurn3; }

@keyframes tomePageTurn1 {
    0%, 4%   { transform: perspective(900px) rotateY(0deg);    opacity: 1; }
    14%      { transform: perspective(900px) rotateY(-180deg); opacity: 1; }
    15%, 100% { transform: perspective(900px) rotateY(-180deg); opacity: 0; }
}
@keyframes tomePageTurn2 {
    0%, 33%  { transform: perspective(900px) rotateY(0deg);    opacity: 1; }
    44%      { transform: perspective(900px) rotateY(-180deg); opacity: 1; }
    45%, 100% { transform: perspective(900px) rotateY(-180deg); opacity: 0; }
}
@keyframes tomePageTurn3 {
    0%, 63%  { transform: perspective(900px) rotateY(0deg);    opacity: 1; }
    74%      { transform: perspective(900px) rotateY(-180deg); opacity: 1; }
    75%, 100% { transform: perspective(900px) rotateY(-180deg); opacity: 0; }
}

/* Reduced motion fallback — respect users who disable animations */
@media (prefers-reduced-motion: reduce) {
    .bisp-tome { animation: none; }
    .bisp-tome-page { animation: none; }
}

@media (max-width: 720px) {
    .home-hero { flex-direction: column; gap: 2rem; }
    .bisp-tome { width: 240px; }
    .home-hero .home-intro { text-align: center; }
}

/* ========== ADMIN — VUE COMMANDES CONSOLIDÉE ========== */
.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.4rem;
    position: relative;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.admin-head::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 80px; height: 2px;
    background: var(--gold);
}
.admin-eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-deep);
    font-weight: 600;
}
.admin-head-titles h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 1.9rem; }

.admin-subnav {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.admin-subnav a {
    padding: 0.55rem 1rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-soft);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}
.admin-subnav a:hover { color: var(--navy); border-color: var(--border); }
.admin-subnav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.admin-subnav a.admin-export {
    margin-left: 1rem;
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.admin-subnav a.admin-export:hover {
    background: var(--gold-deep);
    color: #fff;
    border-color: var(--gold-deep);
}

/* Stats cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--navy);
    padding: 1.3rem 1.4rem;
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    box-shadow: var(--shadow-soft);
}
.stat-card .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-soft);
    font-weight: 600;
}
.stat-card .stat-value {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.1;
}
.stat-card .stat-of {
    font-size: 1rem;
    color: var(--muted);
    font-family: var(--font-sans);
}
.stat-card .stat-sub {
    font-size: 0.78rem;
    color: var(--muted);
    font-style: italic;
}
.stat-card-accent {
    border-top-color: var(--gold);
    background: linear-gradient(135deg, var(--surface) 0%, var(--gold-pale) 100%);
}
.stat-card-accent .stat-value { color: var(--gold-deep); }

/* Tabs + filters bar */
.admin-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-soft);
}
.admin-tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 0.8rem;
}
.admin-tab {
    padding: 0.5rem 1.1rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-soft);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}
.admin-tab:hover { color: var(--navy); border-color: var(--navy); }
.admin-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.admin-filters select,
.admin-filters input[type="text"] {
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.88rem;
    background: var(--surface);
}
.admin-filters input[type="text"] { flex: 1; min-width: 200px; }
.admin-filters select:focus, .admin-filters input:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-pale);
}
.admin-filters button {
    padding: 0.5rem 1.2rem;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.admin-filters button:hover { background: var(--gold); color: var(--navy); }
.admin-filters .check-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-soft);
}
.admin-filters .link-reset {
    color: var(--muted);
    font-size: 0.78rem;
    text-decoration: none;
    margin-left: 0.5rem;
}
.admin-filters .link-reset:hover { color: var(--navy); text-decoration: underline; }

/* === Vue PAR CLASSE === */
.classe-block {
    margin-bottom: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-soft);
}
.classe-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.classe-header h3 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 500;
    color: var(--navy);
}
.classe-meta { font-size: 0.85rem; color: var(--text-soft); }
.classe-meta strong { color: var(--gold-deep); font-weight: 600; }

.matiere-block {
    margin-bottom: 1.2rem;
    border-left: 3px solid var(--navy-pale);
    padding-left: 1.2rem;
}
.matiere-block summary {
    cursor: pointer;
    list-style: none;
    padding: 0.6rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.matiere-block summary::-webkit-details-marker { display: none; }
.matiere-block summary::before {
    content: '▾';
    color: var(--navy);
    margin-right: 0.6rem;
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.matiere-block:not([open]) summary::before { transform: rotate(-90deg); }
.matiere-name {
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
}
.matiere-meta { font-size: 0.82rem; color: var(--text-soft); }
.matiere-meta strong { color: var(--gold-deep); }

.prof-block {
    margin: 0.8rem 0 1.2rem;
    background: var(--bg-soft);
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
}
.prof-header {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.prof-header .prof-name {
    font-weight: 600;
    color: var(--navy);
    font-family: var(--font-serif);
    font-size: 1.05rem;
}
.prof-totaux {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-soft);
}
.prof-totaux strong { color: var(--gold-deep); }
.prof-totaux .muted { color: var(--muted); }

.prof-langue-tag {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.prof-langue-FR { background: var(--navy-bg); color: var(--navy); }
.prof-langue-EN { background: var(--gold-pale); color: var(--gold-deep); }

.lignes-mini {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
}
.lignes-mini th, .lignes-mini td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.85rem;
    vertical-align: middle;
}
.lignes-mini th {
    background: var(--surface-soft);
    color: var(--navy);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.65rem;
}
.lignes-mini th.num, .lignes-mini td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lignes-mini tr:last-child td { border-bottom: none; }
.lignes-mini .qte-highlight { background: var(--gold-pale); }

/* === Vue PAR LIVRE === */
.livres-count {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}
.livres-agg {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.livres-agg th, .livres-agg td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
    vertical-align: middle;
}
.livres-agg th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
}
.livres-agg th.num, .livres-agg td.num { text-align: right; font-variant-numeric: tabular-nums; }
.livres-agg tbody tr:hover { background: var(--bg-soft); }
.livres-agg .qte-highlight { background: var(--gold-pale); }
.livres-agg .qte-highlight strong { color: var(--navy); font-size: 1.05rem; }
.row-doublon { background: rgba(249, 204, 112, 0.08); }
.row-doublon:hover { background: rgba(249, 204, 112, 0.15) !important; }
.badge-doublon {
    display: inline-block;
    margin-left: 0.6rem;
    padding: 0.18rem 0.55rem;
    background: var(--gold);
    color: var(--navy);
    border-radius: 2px;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}
.breakdown-row td { background: var(--bg-soft); padding: 0.5rem 1rem !important; }
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}
.breakdown-table th {
    background: var(--surface-soft);
    color: var(--navy);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.62rem;
    padding: 0.5rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}
.breakdown-table td {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border-soft);
}
.breakdown-table th.num, .breakdown-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown-table tr:last-child td { border-bottom: none; }
.toggle-breakdown { font-weight: 600 !important; }

/* === Vue TOUTES LIGNES === */
.lignes-flat {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.lignes-flat th, .lignes-flat td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.85rem;
    vertical-align: middle;
}
.lignes-flat th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
}
.lignes-flat th.num, .lignes-flat td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lignes-flat tbody tr:hover { background: var(--bg-soft); }
.lignes-flat .qte-highlight { background: var(--gold-pale); }
.lignes-flat .qte-highlight strong { color: var(--navy); }

@media (max-width: 720px) {
    .admin-head { flex-direction: column; align-items: flex-start; }
    .admin-subnav { width: 100%; flex-wrap: wrap; }
    .admin-filters { flex-direction: column; align-items: stretch; }
    .admin-filters select, .admin-filters input { width: 100%; }
    .stat-card .stat-value { font-size: 1.7rem; }
}

/* ========== AUTH PROF (login/signup/dashboard) ========== */
.login-card-prof {
    border-top-color: var(--navy);
    background: var(--surface);
    margin-top: 4rem;
}
.auth-eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-deep);
    font-weight: 600;
    text-align: center;
}
.auth-hint {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 1rem 0 1.5rem;
}
.auth-secondary {
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-soft);
    line-height: 1.5;
}
.auth-secondary a { color: var(--navy); font-weight: 500; }
.check-email-card { text-align: center; }

/* Dashboard */
.dashboard-head { margin-bottom: 2rem; text-align: left; max-width: 920px; margin-inline: auto; }
.dashboard-head h2 { margin: 0.3rem 0 0.5rem; }
.dashboard-subtitle { color: var(--text-soft); font-size: 1rem; margin: 0; }
.dashboard-actions { max-width: 920px; margin: 0 auto 2rem; }
.dashboard-espaces { max-width: 920px; margin: 0 auto; }
.dashboard-empty { max-width: 920px; margin: 2rem auto; text-align: center; color: var(--text-soft); font-size: 1rem; padding: 3rem 2rem; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

.espaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}
.espace-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--navy);
    padding: 1.2rem 1.3rem;
    border-radius: var(--radius-card);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.18s;
    box-shadow: var(--shadow-soft);
}
.espace-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--gold); }
.espace-card-submitted { border-top-color: var(--success); background: var(--success-bg); }
.espace-card-head { display: flex; flex-direction: column; gap: 0.2rem; }
.espace-classe {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--navy);
}
.espace-matiere {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-soft);
    font-weight: 600;
}
.espace-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-soft); }
.espace-statut { padding: 0.2rem 0.55rem; border-radius: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.65rem; }
.espace-statut-draft { background: var(--gold-pale); color: var(--gold-deep); }
.espace-statut-submitted { background: var(--success); color: #fff; }
.espace-card-cta { color: var(--gold-deep); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; padding-top: 0.4rem; border-top: 1px solid var(--border-soft); }

/* Submitted banner sur la page commande */
.submitted-banner {
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-left: 4px solid var(--success);
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.submitted-banner p { margin: 0; color: var(--success); }

/* Bouton "soumettre à l'admin" */
.submit-area {
    background: var(--surface-warm, #f7f5ef);
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    padding: 1.5rem 1.8rem;
    border-radius: var(--radius-card);
    margin: 2rem 0;
    text-align: center;
}
.submit-help {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.6;
}
.btn-submit {
    background: var(--success);
    border-color: var(--success);
    font-size: 0.85rem;
    padding: 0.95rem 2rem;
}
.btn-submit:hover {
    background: #234c33;
    border-color: #234c33;
    color: #fff;
}

/* Inline edit form dans table lignes */
.ligne-row-edit td {
    background: var(--surface-soft);
    padding: 1.2rem !important;
    border-top: 2px solid var(--gold);
}
.inline-edit-form { max-width: 100%; }
.inline-edit-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.6rem 1rem;
}
.inline-edit-grid .form-row { margin-bottom: 0; }
.inline-edit-grid .span-2 { grid-column: span 2; }
.inline-edit-actions {
    margin-top: 1rem;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}
.cancel-edit { background: none; border: none; color: var(--muted); cursor: pointer; font-family: inherit; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.cancel-edit:hover { color: var(--navy); text-decoration: underline; }

/* Nav prof name */
.nav-prof-name { color: var(--gold); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 500; margin-left: 1.5rem; padding-left: 1.5rem; border-left: 1px solid rgba(255,255,255,0.2); }

@media (max-width: 720px) {
    .inline-edit-grid { grid-template-columns: 1fr; }
    .nav-prof-name { display: none; }
}

/* Bouton déconnexion dans la nav */
.nav-logout { display: inline; margin-left: 2rem; }
.nav-logout button {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.35rem 0.9rem;
    font-family: inherit;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.nav-logout button:hover {
    background: var(--gold);
    color: var(--navy);
}

@media (max-width: 720px) {
    .autofill-flex { flex-direction: column; align-items: center; }
    .form-row-pair { grid-template-columns: 1fr; }
    .form-row-pair .form-row { margin-bottom: 1rem; }
}

.link-danger { color: var(--error) !important; }
.link-danger:hover { color: var(--error) !important; text-decoration: underline; }

.isbn-row { display: flex; gap: 0.5rem; }
.isbn-row input { flex: 1; }

/* ========== ORNEMENTS — écusson watermark + volutes ========== */

/* Step-card avec écusson BISP en filigrane (logo officiel) */
.step-card-ornate { position: relative; overflow: hidden; }
.step-card-watermark {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    height: 320px;
    opacity: 0.045;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
    object-fit: contain;
    filter: grayscale(0.2);
}
.step-card-ornate > *:not(.step-card-watermark) { position: relative; z-index: 1; }

/* Home : page entière comme un certificat */
.home-stage {
    position: relative;
    padding: 4rem 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin: 0 auto;
    max-width: 1100px;
}

/* Écusson BISP central (logo officiel, très discret) */
.ornament-shield {
    position: absolute;
    width: 380px;
    height: 380px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
    object-fit: contain;
}

/* Volutes or — coin haut gauche */
.ornament-curl {
    position: absolute;
    width: 130px;
    height: 130px;
    color: var(--gold);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
.ornament-curl-tl { top: 20px; left: 20px; }
.ornament-curl-br { bottom: 20px; right: 20px; }

.home-stage > .home-intro,
.home-stage > .home-grid {
    position: relative;
    z-index: 1;
}

/* ========== CITATION BAR (filigrane littéraire) ========== */
.citation-bar {
    background: var(--bg);
    padding: 1.6rem 3rem;
    text-align: center;
    border-top: 1px solid var(--border-soft);
}
.citation-inner {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-soft);
    line-height: 1.55;
    opacity: 0.85;
}
.citation-mark {
    color: var(--gold-deep);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0.3rem;
    vertical-align: -0.15rem;
}
.citation-text {
    color: var(--navy);
}
.citation-author {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-style: normal;
    color: var(--gold-deep);
    font-weight: 500;
}

@media (max-width: 720px) {
    .step-card-watermark { width: 200px; height: 240px; right: -60px; }
    .ornament-curl { width: 80px; height: 80px; }
    .ornament-shield { width: 220px; height: 264px; }
    .home-stage { padding: 2.5rem 1.5rem; }
    .citation-bar { padding: 1.2rem 1.5rem; }
    .citation-inner { font-size: 0.95rem; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 720px) {
    .topbar-inner { padding: 1rem 1.5rem; }
    .container { padding: 0 1.5rem; margin: 1.5rem auto 2rem; }
    .step-card { padding: 2rem 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .ligne-form-grid { grid-template-columns: 1fr; }
    .ligne-form-grid .span-2, .ligne-form-grid .span-3 { grid-column: span 1; }
    .qte-grid { grid-template-columns: 1fr 1fr; }
    .qte-notes-row { grid-column: span 2; }
    .wizard-steps { flex-direction: column; }
    .wizard-steps li { padding: 0.8rem 1rem; border-right: none; border-bottom: 1px solid var(--border-soft); }
    .wizard-steps li:last-child { border-bottom: none; }
    .sitefoot-inner { flex-direction: column; align-items: flex-start; padding: 1.2rem 1.5rem; }
    .brand-name { font-size: 1.4rem; }
}
