/* ═══════════════════════════════════════════════════════
   KAPTIVIA — Socle CSS partagé
   Utilisé par : Proposition.html + catalogue v1.1.html
   Compléments : proposition.page.css | catalogue.page.css | proposition.print.css
   Règles : tokens :root pour les couleurs, .table-wrap > table pour les tables, zéro !important
   ═══════════════════════════════════════════════════════ */


/* ─── Design Tokens ─── */

:root {
    /* Brand */
    --brand:        #ecb609;

    /* Texte */
    --text:         #1f2937;
    --text-muted:   #6b7280;
    --text-light:   #9ca3af;

    /* Fond */
    --bg:           #f3f4f6;
    --bg-card:      #7086e4;
    --bg-dark:      #46433d;

    /* Sémantique */
    --green-bg:     #d1fae5;
    --green-dark:   #065f46;

    /* Rôles visuels (réutilisables) */
    --surface-strong:      #696964;
    --text-on-strong:      #fff;
    --accent-on-strong:    var(--brand);

    --table-border:        #e5e7eb;
    --table-zebra-bg:      #f9fafb;
    --hero-meta-text:      var(--text-light);

    /* Alias composants */
    --table-total-bg:      var(--surface-strong);
    --table-total-text:    var(--text-on-strong);
    --table-pack-bg:       var(--surface-strong);
    --table-pack-text:     var(--accent-on-strong);

    /* Rayons & ombres */
    --radius:       24px;
    --radius-sm:    16px;
    --shadow:       0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg:    0 12px 30px rgba(0, 0, 0, 0.10);

    /* Typographie */
    --font-title:   'Poppins', sans-serif;
    --font-body:    'Poppins', sans-serif;
    --font-accent:  'ccsignlanguage-vistalid', 'ccsignlanguage',
                    'Brush Script MT', 'Segoe Script',
                    'Snell Roundhand', cursive;

    /* Layout */
    --max-w:        920px;
    --section-gap:  3rem;
}


/* ─── Reset ─── */

*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}


/* ═══════════════════════ HEADER ═══════════════════════ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header__logo {
    height: 3rem;
    width: auto;
    display: block;
}



/* ═══════════════════════ LAYOUT ═══════════════════════ */

.page-wrapper {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-block {
    margin-bottom: var(--section-gap);
}

.section-block--first {
    margin-top: 1.5rem;
}



/* ═══════════════════════ HERO ═══════════════════════ */

.hero {
    text-align: center;
    padding: 0.5rem 2rem 1.2rem;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero__overtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--brand);
    margin-bottom: 0.5rem;
}

/* ═══════════════════════ TITRES BICOLORES (composed-title) ═══════════════════════ */

.composed-title {
    font-family: var(--font-title);
    line-height: 1.15;
    margin: 0;
    width: 100%;
}

.composed-title__stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    gap: clamp(0.05rem, 0.45vw, 0.28rem);
}

/* Ligne 1 — Poppins Black */
.composed-title__main {
    display: block;
    align-self: center;
    width: max-content;
    max-width: 100%;
    text-align: center;
    font-family: var(--font-title);
    font-weight: 900;
    color: #ffffff;
    font-size: clamp(1.5rem, 3.8vw, 3.35rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
}

/* Ligne 2 — Police manuscrite dorée */
.composed-title__accent {
    display: block;
    align-self: stretch;
    width: 100%;
    text-align: left;
    font-family: var(--font-accent);
    font-weight: 400;
    color: var(--brand);
    font-size: clamp(1.55rem, 4vw, 3.45rem);
    line-height: 0.9;
    letter-spacing: 0;
}


/* ─── Variante : hero titre en une ligne ─── */

.composed-title--hero-inline {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.composed-title--hero-inline .composed-title__main {
    font-size: clamp(1.5rem, 3.8vw, 3.35rem);
}

.composed-title--hero-inline .composed-title__accent {
    font-size: clamp(1.55rem, 4vw, 3.45rem);
    width: auto;
}


/* ─── Variante : titres de section (fond clair) ─── */

.section-title {
    margin-bottom: 0.4rem;
    width: 100%;
    padding-left: 1.5rem;
}

.section-title .composed-title__stack {
    margin: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
}

.section-title .composed-title__main {
    color: var(--text);
    align-self: auto;
    text-align: left;
    font-size: clamp(0.95rem, 2.2vw, 1.45rem);
}

.section-title .composed-title__accent {
    font-size: clamp(1.05rem, 2.4vw, 1.6rem);
    width: auto;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 0.15rem 0 0.4rem;
    padding-left: 1.5rem;
    line-height: 1.4;
}




/* ═══════════════════════ CARDS ═══════════════════════ */

.card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.card + .card { margin-top: 1.5rem; }



/* ═══════════════════════ TABLES ═══════════════════════ */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    background: #ffffff;
}

.table-wrap > table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.table-wrap > table thead th {
    background: var(--surface-strong);
    color: #fff;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.55rem 0.8rem;
    text-align: left;
    white-space: nowrap;
}

.table-wrap > table thead th:last-child { text-align: right; }

.table-wrap > table tbody td {
    padding: 0.45rem 0.8rem;
    border-bottom: 1px solid var(--table-border);
    vertical-align: middle;
}

.table-wrap > table tbody td:last-child {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    width: 1%;
}

.table-wrap > table tbody tr:nth-child(even):not(.table-row-total):not(.table-row-pack) {
    background: var(--table-zebra-bg);
}

.table-wrap > table tbody tr:last-child td { border-bottom: none; }

:where(.table-wrap > table) tbody tr.table-row-total {
    background: var(--table-total-bg);
    color: var(--table-total-text);
}

:where(.table-wrap > table) tbody tr.table-row-total td {
    font-family: var(--font-title);
    font-weight: 700;
    border-bottom: none;
    color: var(--table-total-text);
    padding: 0.2rem 0.8rem;
}

:where(.table-wrap > table) tbody tr.table-row-pack {
    background: var(--table-pack-bg);
}

:where(.table-wrap > table) tbody tr.table-row-pack td {
    color: var(--table-pack-text);
    font-weight: 700;
    border-bottom: none;
    padding: 0.2rem 0.8rem;
}

:where(.table-wrap > table) tbody tr.table-row-pack td:last-child {
    color: var(--table-pack-text);
    font-weight: 700;
}

/* Utility: alignement texte à droite */
.u-text-right { text-align: right; }



.footer-legal {
    background: var(--bg-dark);
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* ═══════════════════════ UTILITAIRES ═══════════════════════ */

.sep {
    display: none;
}


/* ═══════════════════════ RESPONSIVE (ÉCRAN) ═══════════════════════ */

@media screen and (max-width: 700px) {
    .hero                { padding: 3rem 1.2rem 2.5rem; }
    .page-wrapper        { padding: 0 1rem; }
    .card                { padding: 1.4rem; }
    .table-wrap > table thead th,
    .table-wrap > table tbody td {
        padding: 0.65rem 0.7rem;
        font-size: 0.82rem;
    }
    .header              { padding: 0.75rem 1rem; }
}
