/* ============================================================
   COLLABOOK — Identité visuelle
   Palette : monde de la scène intimiste / papier kraft d'affiche
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Couleurs — papier kraft + rouge théâtral, écho direct au dossier Amour Scopie */
    --kraft-fond: #F2E9DC;
    --kraft-fond-clair: #FAF6EF;
    --kraft-brun: #8B7355;
    --encre: #2B2825;
    --rouge-scene: #A4302C;
    --rouge-scene-clair: #C44E48;
    --vert-confirme: #4A6B4D;
    --jaune-attente: #C68A2E;
    --bordure: #D9CCB5;
    --ombre: rgba(43, 40, 37, 0.12);

    /* Typo */
    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--kraft-fond);
    color: var(--encre);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3, .display {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--encre);
    margin: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

a { color: var(--rouge-scene); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visible pour accessibilité clavier */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--rouge-scene);
    outline-offset: 2px;
}

/* ---------- Layout ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: var(--encre);
    color: var(--kraft-fond-clair);
    padding: 24px 16px;
    flex-shrink: 0;
}

.sidebar .logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.sidebar .logo .accent { color: var(--rouge-scene-clair); }

.sidebar .structure-name {
    font-size: 0.78rem;
    opacity: 0.65;
    margin-bottom: 28px;
}

.sidebar nav a {
    display: block;
    color: var(--kraft-fond-clair);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.92rem;
    font-weight: 500;
}

.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.sidebar nav a.active { color: var(--rouge-scene-clair); }

.main-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1280px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--encre);
    padding-bottom: 14px;
}

.page-header .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rouge-scene);
    display: block;
    margin-bottom: 4px;
}

/* ---------- Cartes ---------- */
.card {
    background: var(--kraft-fond-clair);
    border: 1px solid var(--bordure);
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 6px var(--ombre);
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 18px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.15s ease;
}

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

.btn-primary { background: var(--rouge-scene); color: #fff; }
.btn-primary:hover { background: var(--rouge-scene-clair); }

.btn-secondary { background: transparent; color: var(--encre); border: 1.5px solid var(--encre); }
.btn-secondary:hover { background: var(--encre); color: #fff; }

/* ---------- Formulaires ---------- */
label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--encre);
}

input, select, textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 9px 12px;
    border: 1.5px solid var(--bordure);
    border-radius: 6px;
    background: #fff;
    color: var(--encre);
    margin-bottom: 16px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--rouge-scene);
    outline: none;
}

/* ---------- Badges de qualification contact ---------- */
.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.badge-direct { background: #DCEBDC; color: var(--vert-confirme); }
.badge-service { background: #F3E6C8; color: var(--jaune-attente); }
.badge-generique { background: #EDE3D3; color: var(--kraft-brun); }

/* ---------- Pipeline — signature "actes de la tournée" ---------- */
.pipeline {
    display: grid;
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.pipeline-acte {
    background: var(--kraft-fond-clair);
    border-radius: 10px;
    border: 1px solid var(--bordure);
    min-height: 200px;
}

.pipeline-acte-header {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 2px solid var(--encre);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pipeline-acte-header .acte-num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--rouge-scene);
    font-weight: 500;
}

.pipeline-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.ticket-card {
    background: #fff;
    border: 1px solid var(--bordure);
    border-left: 4px solid var(--rouge-scene);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.84rem;
    box-shadow: 0 1px 3px var(--ombre);
}

.ticket-card .ticket-salle { font-weight: 600; margin-bottom: 2px; }
.ticket-card .ticket-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--kraft-brun); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .main-content { padding: 20px; }
    .pipeline { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
