/* ============================================================
   IMPORTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;700&family=Cinzel:wght@400;700&display=swap');

* {
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --p-width:      148.5mm;
    --p-height:     210mm;
    --m-top:        15mm;
    --m-bottom:     20mm;
    --m-inner:      22mm;
    --m-outer:      18mm;
    --gold:         #c5a059;
    --gold-light:   #e5d1a4;
    --bg-soft:      #fdfdfd;
    --text-dark:    #1a1a1a;
    --border-light: #eee;
    --dark-choco:   #3e2723;
    --milk-choco:   #5d4037;
    --paper:        #fdfaf7;
}


/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

body {
    margin: 0;
    padding: 0;
    background: #f1f5f9;
    font-family: 'Inter', sans-serif;
}


/* ============================================================
   MISE EN PAGE — STRUCTURE GÉNÉRALE
   ============================================================ */
#master-flow {
    width: 297mm;
    margin: 0 auto;
    padding: 20px 0;
}

.page-pair {
    display: flex;
    width: 297mm;
    height: var(--p-height);
    background: white;
    margin-bottom: 15mm; /* Espace entre les feuilles sur l'écran */
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Ombre jolie sur le web */
}


.page-pair::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    border-left: 0.5pt dashed #eee;
    z-index: 50;
}

.page-section {
    width: var(--p-width);
    height: var(--p-height);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-size: cover;
}

.page-at-left  { background-image: url('https://cip-insertion.soins.me/wp-content/uploads/mon-livre-numerique/media/filigrane3.png'); padding: var(--m-top) var(--m-inner)  var(--m-bottom) var(--m-outer); }
.page-at-right { background-image: url('https://cip-insertion.soins.me/wp-content/uploads/mon-livre-numerique/media/filigrane2.png'); padding: var(--m-top) var(--m-outer)  var(--m-bottom) var(--m-inner); }


/* ============================================================
    COUVERTURES & PAGES PLEINES 
   ============================================================ */
.page-section[data-page="0"],
.page-section[data-page="1"],
.page-section[data-page="2"],
.page-section[data-page="4"],
.page-section[data-page="16"],
.page-section[data-page="30"],
.page-section[data-page="42"],
.page-section[data-page="57"],
.page-section[data-page="66"],
.page-section[data-page="78"],
.page-section[data-page="92"],
.page-section[data-page="99"],
.page-section[data-page="100"],
.page-section[data-page="101"],
.page-section[data-page="102"],
.page-section[data-page="103"],
.page-section[data-page="109"],
.page-section[data-page="110"],
.page-section[data-page="111"],
.page-section[data-page="112"],
.page-section[data-page="114"],
.page-section[data-page="113"],
.page-section[data-page="115"],
.page-section[data-page="116"],
.page-section[data-page="117"],
.page-section[data-page="118"],
.page-section[data-page="119"],
.page-section[data-page="120"] {
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Cache le numéro de page UNIQUEMENT sur ces pages (Pas de virgule avant .page-num) */
.page-section[data-page="0"] .page-num-luxe,
.page-section[data-page="1"] .page-num-luxe,
.page-section[data-page="2"] .page-num-luxe,
.page-section[data-page="4"] .page-num-luxe,
.page-section[data-page="15"] .page-num-luxe,
.page-section[data-page="16"] .page-num-luxe,
.page-section[data-page="30"] .page-num-luxe,
.page-section[data-page="42"] .page-num-luxe,
.page-section[data-page="57"] .page-num-luxe,
.page-section[data-page="66"] .page-num-luxe,
.page-section[data-page="69"] .page-num-luxe,
.page-section[data-page="89"] .page-num-luxe,
.page-section[data-page="90"] .page-num-luxe,
.page-section[data-page="98"] .page-num-luxe,
.page-section[data-page="99"].page-num-luxe,
.page-section[data-page="105"].page-num-luxe,
.page-section[data-page="106"].page-num-luxe,
.page-section[data-page="109"].page-num-luxe,
.page-section[data-page="110"].page-num-luxe,
.page-section[data-page="111"].page-num-luxe,
.page-section[data-page="112"].page-num-luxe,
.page-section[data-page="113"].page-num-luxe,
.page-section[data-page="114"].page-num-luxe,
.page-section[data-page="115"].page-num-luxe,
.page-section[data-page="116"] .page-num-luxe {
    display: none !important;
}

/* Cache le header UNIQUEMENT sur ces pages (Pas de virgule avant .my-prestige-header) */
.page-section[data-page="0"] .my-prestige-header,
.page-section[data-page="1"] .my-prestige-header,
.page-section[data-page="4"] .my-prestige-header,
.page-section[data-page="16"] .my-prestige-header,
.page-section[data-page="29"] .my-prestige-header,
.page-section[data-page="30"] .my-prestige-header,
.page-section[data-page="41"] .my-prestige-header,
.page-section[data-page="42"] .my-prestige-header,
.page-section[data-page="56"] .my-prestige-header,
.page-section[data-page="57"] .my-prestige-header,
.page-section[data-page="65"] .my-prestige-header,
.page-section[data-page="66"] .my-prestige-header,
.page-section[data-page="77"] .my-prestige-header,
.page-section[data-page="78"] .my-prestige-header,
.page-section[data-page="91"] .my-prestige-header,
.page-section[data-page="92"] .my-prestige-header,
.page-section[data-page="99"] .my-prestige-header,
.page-section[data-page="105"] .my-prestige-header,
.page-section[data-page="106"] .my-prestige-header,
.page-section[data-page="109"] .my-prestige-header,
.page-section[data-page="110"] .my-prestige-header,
.page-section[data-page="111"] .my-prestige-header,
.page-section[data-page="112"] .my-prestige-header,
.page-section[data-page="113"] .my-prestige-header,
.page-section[data-page="113"] .my-prestige-header,
.page-section[data-page="114"] .my-prestige-header,
.page-section[data-page="116"] .my-prestige-header {
    display: none !important;
}

/* ============================================================
   SUPPRESSION DU FILIGRANE
   ============================================================ */


/* ============================================================
   EN-TÊTE DE CHAPITRE
   ============================================================ */
.my-prestige-header {
    margin-bottom: 8px;
    position: relative;
    z-index: 10;
}

.my-prestige-header h1 {
    color: var(--gold) !important;
    font-size: 1.6rem !important;
    margin: 0 !important;
    display: block !important;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.my-prestige-header .subtitle {
    display: block !important;
    margin-top: 2px;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #999;
    text-transform: uppercase;
}


/* ============================================================
   NUMÉRO DE PAGE
   ============================================================ */
.page-num {
    position: absolute;
    bottom: 8mm;
    left: 0;
    right: 0;
    z-index: 30;
    height: 10mm;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8pt;
    color: #ccc;
    letter-spacing: 2px;
}


/* ============================================================
   CORPS DE TEXTE
   ============================================================ */
.text-body {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    font-family: 'Libre Baskerville', serif;
    font-size: 11.3pt;
    line-height: 1.5;
    color: #1a1a1a;
    text-align: justify;
}

.text-body p { margin-bottom: 1em; }

/* Masquage des éléments structurels dupliqués dans .text-body */
.text-body .chapter-header,
.text-body .chapter-number,
.text-body .separator,
.text-body h1,
.text-body h2,
.text-body blockquote,
.text-body .subtitle {
    display: none !important;
}

/* Lettrine — désactivée sur couvertures et sommaire */
.page-section:not(.sommaire-page):not([data-page="1"]):not([data-page="112"])
.text-body p:first-of-type::first-letter {
    float: left;
    margin-top: 3px;
    padding: 4px 8px 0 0;
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 0.8;
    color: var(--gold);
}


/* ============================================================
   CITATION
   ============================================================ */
.quote-container {
    display: block !important;
    position: relative;
    margin: 1px 0;
    padding: 2px 0 6px 5px;
    border-left: 1pt solid var(--gold);
    background: none !important;
}

.quote-text {
    display: block;
    font-family: 'Libre Baskerville', serif;
    font-size: .95rem;
    line-height: 1.5;
    color: #413e3e;
    text-align: justify;
}


/* ============================================================
   BULLE DE TEXTE
   ============================================================ */
.text-bubble {
    margin-top: 5px;
    padding: 5px;
    background: #fdfaf5;
    border: 1px solid #f8f1e5;
    border-radius: 12px;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #6d4c41;
}


/* ============================================================
   CARTE CONCEPT
   ============================================================ */
.concept-card {
    padding: 10px;
    background-color: rgba(247, 247, 247, 0.4);
    border: 1px solid #e6ccb2;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    margin: initial;
}

.concept-label {
    display: block;
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gold-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.concept-content {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}


/* ============================================================
   SOMMAIRE
   ============================================================ */
.toc-container {
    margin-top: 10px;
    padding: 0 2mm;
    column-count: 2;
    column-gap: 12mm;
    column-rule: 1px solid #f8f1e5;
}

.toc-item {
    display: table;
    width: 100%;
    margin-bottom: 6px;
    break-inside: avoid;
    font-size: 8.5pt;
}

.toc-is-chapter { font-weight: bold; color: var(--gold); margin-top: 10px; }
.toc-is-sub     { padding-left: 8px; font-style: italic; color: #666; }

.toc-title { display: table-cell; white-space: nowrap; padding-right: 4px; }
.toc-dots  { display: table-cell; width: 100%; border-bottom: 1px dotted var(--gold-light); }
.toc-page  { display: table-cell; width: 25px; padding-left: 4px; text-align: right; color: var(--gold); font-weight: 700; white-space: nowrap; }


/* ============================================================
   IMPRESSION
   ============================================================ */
/* FORCE LE PAYSAGE AVANT TOUT */
@page {
    size: A4 landscape;
    margin: 0;
}

/* Cette règle DOIT être hors du @media print pour certains navigateurs */
@page {
    size: A4 landscape !important;
    margin: 0 !important;
}

@media print {
    /* 1. CACHER LE BOUTON ET LA BARRE DE NAVIGATION */
    .no-print, 
    button, 
    .bg-white.sticky { 
        display: none !important; 
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 2. FORCER LE CONTENU */
    body {
        background: white !important;
        width: 297mm !important;
        height: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    #master-flow {
        width: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .page-pair {
        display: flex !important; /* Force les deux pages A5 côte à côte */
        flex-direction: row !important;
        width: 297mm !important;
        height: 210mm !important;
        page-break-after: always !important;
        break-after: page !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Évite que le moteur de rendu ne "coupe" le texte bizarrement */
    .page-section {
        overflow: hidden !important;
        height: 210mm !important;
        width: 148.5mm !important;
    }
}


/* ============================================================
   RENDU LUXE — STYLES SUPPLÉMENTAIRES
   ============================================================ */

/* --- Corps de texte intérieur --- */
.inner-text-body {
    flex-grow: 1;
    margin-bottom: 45px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    line-height: 1.2;
}

.inner-text-body p {
    margin-bottom: 1em;
    text-align: justify;
}


/* --- En-tête prestige (variante luxe centrée) --- */
.my-prestige-header {
    margin-bottom: 25px;
    text-align: center;
}

.my-prestige-header h1 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #c5a059 !important;
}

.my-prestige-header .subtitle {
    margin-top: 2px;
    font-style: italic;
    font-size: 0.85rem;
    color: #666;
}


/* --- Numéro de page luxe --- */
.page-num-luxe {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.9;
    pointer-events: none;
}

.page-num-luxe .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #c5a059, transparent);
}

.page-num-luxe .num {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #c5a059;
}

.page-num-luxe .ornement {
    font-size: 8px;
    color: #c5a059;
    opacity: 0.8;
}


/* --- Conteneur pleine page (couverture & dos) --- */
.full-page-container {
    width: 100%;
    height: 100%;
}


/* ============================================================
   VUE WEB — BASE (variante lecture)
   ============================================================ */
body.web-view {
    background-color: var(--bg-soft);
    color: var(--text-dark);
    padding: 60px 20px;
    font-family: 'Libre Baskerville', serif;
    line-height: 1.8;
}

.container-main {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
}

.cacao-bg {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 70%;
    opacity: 0.03;
    pointer-events: none;
}


/* ============================================================
   VUE WEB — EN-TÊTE
   ============================================================ */
header {
    margin-bottom: 60px;
    text-align: center;
}

.chapter-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chapter-number {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: var(--gold);
}

h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
}

.separator {
    margin-top: 10px;
    font-size: 1.5rem;
    color: var(--gold);
}

h2 {
    margin: 80px 0 40px;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    color: var(--gold);
}


/* ============================================================
   VUE WEB — SECTIONS & INTRO
   ============================================================ */
.intro-section {
    margin-bottom: 50px;
    font-size: 1.1rem;
    text-align: justify;
    color: #333;
}

.page-break {
    display: block;
    height: 60px;
}

footer {
    margin-top: 100px;
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: #999;
}


/* ============================================================
   VUE WEB — BULLE DE PRÉSENTATION
   ============================================================ */
.presentation-bubble {
    display: flex;
    align-items: center;
    max-width: 780px;
    margin: 60px auto;
    padding: 40px 50px;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: 60px;
    box-shadow: 0 15px 40px rgba(176, 141, 87, 0.08);
}

.lettrine-l {
    margin-right: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 100px;
    font-style: italic;
    line-height: 0.8;
    color: var(--gold);
}

.essence-content {
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.5;
    color: #222;
}


/* ============================================================
   VUE WEB — GRILLE DE CARTES
   ============================================================ */
.signals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 60px;
}


.concept-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.card-title {
    display: block;
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold);
}

.card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.card-full {
    grid-column: span 2;
    padding: 20px;
    background: linear-gradient(135deg, rgba(254, 249, 195, 0.25) 0%, rgba(254, 249, 195, 0.05) 100%);
    border: 1px solid var(--gold);
    
}


/* ============================================================
   VUE WEB — LISTE D'ACTIONS
   ============================================================ */
.action-list {
    list-style: none;
    max-width: 650px;
    margin: 40px auto;
    padding: 0;
}

.action-list li {
    position: relative;
    padding: 18px 0 18px 40px;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.05rem;
}

.action-list li::before {
    content: "❦";
    position: absolute;
    top: 18px;
    left: 0;
    font-size: 1.2rem;
    color: var(--gold);
}


/* ============================================================
   TABLEAU FORCÉ (debug / surcharge)
   ============================================================ */
table.force-border {
    border-collapse: collapse !important;
    border: 2px solid #000 !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

table.force-border th,
table.force-border td {
    border: 1px solid #000 !important;
    padding: 12px !important;
    visibility: visible !important;
}


/* ============================================================
   TAG MINI
   ============================================================ */
.tag-mini {
    display: inline-block;
    margin-right: 5px;
    padding: 2px 5px;
    border: 1px solid #000;
    font-size: 0.75rem;
    font-weight: bold;
}


/* ============================================================
   INFOBULLE / TOOLTIP
   ============================================================ */
.info-trigger {
    display: inline-block;
    position: relative;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    background: #b08968;
    border-radius: 50%;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    color: white;
    cursor: pointer;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 130%;
    left: 50%;
    z-index: 10;
    width: 260px;
    margin-left: -130px;
    padding: 12px;
    background-color: #5d4037;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    font-weight: normal;
    text-align: left;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.info-trigger:hover .tooltip {
    visibility: visible;
    opacity: 1;
}


/* ============================================================
   CARTE RÉSULTAT
   ============================================================ */
.result-card {
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: #fffcf9;
    border: 2px solid #b08968;
    border-left: 12px solid #5d4037;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.result-title {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e6ccb2;
    font-family: serif;
    color: #5d4037;
}

.result-formula {
    display: block;
    margin: 25px 0 10px;
    padding: 10px;
    background: #eee;
    border-radius: 5px;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-align: center;
    text-transform: uppercase;
    color: #5d4037;
}


/* ============================================================
   ÉTAPES & SCORES
   ============================================================ */
.step-desc {
    margin: 15px 0;
    padding: 10px;
    background: #fdfaf7;
    border-left: 3px solid #e6ccb2;
    border-radius: 5px;
}

.step-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #b08968;
}

.releve-score {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #5d4037;
}


/* ============================================================
   SYNTHÈSE FINALE
   ============================================================ */
.final-synth-container {
    margin-top: 30px;
    padding: 25px;
    background: #5d4037;
    border: 1px solid #3e2723;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: white;
}

.final-synth-title {
    display: block;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(230,204,178,0.3);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #e6ccb2;
}


/* ============================================================
   ZONE D'ACTION & BOUTON
   ============================================================ */
.action-zone {
    margin: 40px 0;
    padding: 20px;
    text-align: center;
}

.btn-main {
    padding: 18px 35px;
    background-color: #5d4037;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-main:hover {
    background-color: #3e2723;
    transform: translateY(-2px);
}


/* ============================================================
   FEEDBACK & ERREURS
   ============================================================ */
.status-feedback {
    display: none;
    margin-top: 20px;
    font-style: italic;
    font-weight: bold;
    color: #2d6a4f;
}

.error-msg {
    display: none;
    margin-top: 15px;
    font-weight: bold;
    color: #d32f2f;
}


/* ============================================================
   INPUT NUMÉRIQUE
   ============================================================ */
input[type=number] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    color: #5d4037;
}


/* ============================================================
   INTERACTIVITÉ — BOUTON INFO
   ============================================================ */
.info-trigger {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    background: var(--gold);
    border-radius: 50%;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    color: white;
    cursor: pointer;
}


/* ============================================================
   TABLEAU DE SCORES
   ============================================================ */
.score-table td {
    padding: 8px 0;
    border-bottom: 1px solid #f8f1e5;
    font-size: 0.9rem;
}


/* ============================================================
   BOÎTE RÉSULTAT FINAL
   ============================================================ */
.result-box-final {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed var(--gold);
    border-radius: 10px;
    background: rgba(197, 160, 89, 0.05);
    text-align: center;
}


/* ============================================================
   VARIABLES — MODULE VALEURS / EXERCICE INTERACTIF
   ============================================================ */
:root {
    --chocolat-deep: #3e2723;
    --chocolat-mid:  #5d4037;
    --bronze:        #b08968;
    --creme:         #fdfaf7;
}


/* ============================================================
   NUAGE DE VALEURS
   ============================================================ */
.values-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.value-tag {
    padding: 10px 18px;
    border: 1.5px solid var(--bronze);
    border-radius: 25px;
    background: white;
    font-weight: 500;
    color: var(--chocolat-mid);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-tag:hover {
    border-color: var(--chocolat-deep);
    background: var(--creme);
}

.value-tag.selected {
    background: var(--chocolat-mid);
    border-color: var(--chocolat-mid);
    color: white;
    box-shadow: 0 4px 10px rgba(93, 64, 55, 0.3);
}

.value-tag.disabled {
    opacity: 0.5;
    border-style: dashed;
    cursor: not-allowed;
}


/* ============================================================
   SLIDER
   ============================================================ */
.slider-container {
    margin: 40px 0;
    padding: 10px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--chocolat-mid);
}


/* ============================================================
   TEXTAREA
   ============================================================ */
textarea {
    width: 100%;
    min-height: 100px;
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #e6ccb2;
    border-radius: 12px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--chocolat-deep);
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--chocolat-mid);
    background: var(--creme);
}


/* ============================================================
   BOUTON ENREGISTRER
   ============================================================ */
.btn-save {
    width: 100%;
    margin-top: 30px;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--chocolat-mid), var(--chocolat-deep));
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: all 0.4s;
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}


/* ============================================================
   BOÎTE RÉSULTAT
   ============================================================ */
.result-box {
    display: none;
    position: relative;
    overflow: hidden;
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #e6ccb2;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.result-box::before {
    content: "❦";
    position: absolute;
    top: -10px;
    right: 20px;
    z-index: 0;
    font-size: 4rem;
    color: var(--creme);
}

.result-content {
    position: relative;
    z-index: 1;
    line-height: 1.6;
    color: var(--chocolat-deep);
}

.result-title {
    display: inline-block;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bronze);
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--chocolat-mid);
}


/* ============================================================
   UTILITAIRES — MODULE INTERACTIF
   ============================================================ */
.highlight {
    font-weight: 700;
    color: var(--bronze);
}

.status-msg {
    display: none;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    color: #2d6a4f;
}

.icon-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--chocolat-mid);
}

svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}


/* ============================================================
   GRILLE VALEURS 2 COLONNES
   ============================================================ */
.value-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.value-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    background: rgba(197, 160, 89, 0.05);
    font-size: 0.95rem;
    color: var(--chocolat-deep);
}

.value-item::before {
    content: "☐";
    margin-right: 8px;
    color: var(--gold);
}


/* ============================================================
   THERMOMÈTRE — GRILLE CHAUD / FROID
   ============================================================ */
.thermometer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.thermo-box {
    padding: 20px;
    border: 1px solid #e6ccb2;
    border-radius: 12px;
}

.thermo-box.cold {
    background-color: #f0f4f8;
    border-color: #bcd0e3;
}

.thermo-box.hot {
    background-color: #fff5f2;
    border-color: #f8d7da;
}

.thermo-title {
    display: block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}


/* ============================================================
   CHECKLIST
   ============================================================ */
.checklist {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.checklist li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    background: rgba(197, 160, 89, 0.05);
    font-size: 0.95rem;
}

.checklist input[type="checkbox"] {
    margin-right: 8px;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}


/* ============================================================
   SCORE & INGRÉDIENTS
   ============================================================ */
.score-input {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--chocolat-mid);
}

.ingredient-list {
    padding: 20px;
    background: #fff;
    border: 1px solid #e6ccb2;
    border-radius: 12px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.ingredient-item span {
    width: 100px;
    font-weight: bold;
    color: var(--chocolat-mid);
}

input[type=range] {
    flex: 1;
    accent-color: var(--bronze);
}


/* ============================================================
   MODULE LIGNÉE 1.6 / 3.6 — CONTENEURS
   ============================================================ */
.section-box {
    min-height: 80vh;
    margin-bottom: 40px;
}

.test-3s {
    margin-bottom: 25px;
    padding: 30px;
    background: #fdfaf7;
    border: 2px dashed var(--bronze);
    border-radius: 15px;
    text-align: center;
}


/* ============================================================
   MODULE LIGNÉE — MOTS / TAGS
   ============================================================ */
.word-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
}

.word-tag {
    padding: 12px 24px;
    border: 1px solid var(--bronze);
    border-radius: 30px;
    background: white;
    font-weight: 600;
    color: var(--chocolat-mid);
    cursor: pointer;
    transition: all 0.3s ease;
}

.word-tag:hover {
    background: #f5ebe0;
    transform: translateY(-2px);
}

.word-tag.selected {
    background: var(--chocolat-mid);
    border-color: var(--chocolat-mid);
    color: white;
    box-shadow: 0 4px 10px rgba(93,64,55,0.2);
}


/* ============================================================
   MODULE LIGNÉE — GRILLE AUDIT
   ============================================================ */
.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s;
}

.checklist-item:hover {
    background: #fdfaf7;
    border-color: #e6ccb2;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--chocolat-mid);
    cursor: pointer;
}


/* ============================================================
   MODULE LIGNÉE — SYNTHÈSE MAÎTRE
   ============================================================ */
.master-synthesis {
    display: none;
    margin-top: 40px;
    padding: 30px;
    border-left: 10px solid #d4af37;
    border-radius: 15px;
    background: var(--chocolat-deep);
    color: var(--creme);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.master-synthesis h3 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212,175,55,0.3);
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #d4af37;
}

.code-badge {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 15px;
    border: 1px solid #d4af37;
    border-radius: 4px;
    background: #1a1a1a;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    color: #d4af37;
}


/* ============================================================
   MODULE LIGNÉE — ÉTIQUETTES & SCÉNARIO
   ============================================================ */
.task-label {
    display: inline-block;
    margin-bottom: 15px;
    padding: 5px 15px;
    border-radius: 4px;
    background: var(--bronze);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.scenario-title {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--chocolat-mid);
}


/* ============================================================
   MODULE LIGNÉE — ANIMATION & RESPONSIVE
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .audit-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   SCORE FINAL
   ============================================================ */
.final-score {
    font-size: 1rem;
    font-weight: bold;
    color: var(--gold);
}


/* ============================================================
   MODULE PRINT — AUDIT
   ============================================================ */
.audit-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #e6ccb2;
    border-radius: 8px;
}

.audit-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e6ccb2;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--chocolat-mid);
}

.score-table-print {
    width: 100%;
    border-collapse: collapse;
}

.score-table-print td {
    padding: 12px 0;
    border-bottom: 1px solid #fdf5eb;
    font-size: 0.95rem;
}

.score-placeholder {
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--bronze);
}


/* ============================================================
   MODULE PRINT — DIAGNOSTIC & SIGNATURE
   ============================================================ */
.diagnosis-zone {
    margin-top: 30px;
    padding: 25px;
    border: 2px solid var(--chocolat-mid);
    border-radius: 12px;
    background: #fdfaf7;
}

.diagnosis-placeholder {
    height: 30px;
    margin: 15px 0;
    border-bottom: 1px solid #e6ccb2;
}

.signature-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background: var(--chocolat-mid);
    text-align: center;
    color: white;
    -webkit-print-color-adjust: exact;
}

.signature-line {
    display: block;
    margin-top: 10px;
    font-size: 1.5rem;
    letter-spacing: 5px;
    color: #e6ccb2;
}


/* ============================================================
   MODULE PRINT — TABLEAU RÉCAPITULATIF
   ============================================================ */
.table-summary {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.table-summary th,
.table-summary td {
    padding: 12px;
    border: 1px solid #e6ccb2;
    text-align: left;
}

.table-summary th {
    background-color: #f5ebe0;
    color: var(--chocolat-mid);
}


/* ============================================================
   MODULE PRINT — RÈGLES IMPRESSION
   ============================================================ */
@media print {
    .audit-card { break-inside: avoid; }
}


/* ============================================================
   MODULE PRINT — ZONE D'ÉCRITURE
   ============================================================ */
.writing-zone {
    position: relative;
    min-height: 150px;
    margin-top: 15px;
    padding: 10px 15px;
    border: 1px solid #e6ccb2;
    border-radius: 8px;
    background: #fff;
}

.writing-zone::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 2.2rem;
    background-image: linear-gradient(#e6ccb2 1px, transparent 1px);
    background-size: 100% 2.5rem;
    pointer-events: none;
}


/* ============================================================
   MODULE PRINT — PILIER & TABLEAU
   ============================================================ */
.pillar-card {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 5px solid var(--bronze);
    break-inside: avoid;
}

.table-summary-print {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9rem;
}

.table-summary-print th,
.table-summary-print td {
    padding: 10px;
    border: 1px solid #e6ccb2;
    text-align: left;
}

.table-summary-print th {
    background-color: var(--paper);
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--milk-choco);
}


/* ============================================================
   MODULE PRINT — TEXTE INSTRUCTION & BADGE
   ============================================================ */
.instruction-text {
    margin-bottom: 10px;
    font-style: italic;
    font-size: 0.9rem;
    color: #7f6a56;
}

.goal-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--milk-choco);
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
}


/* ============================================================
   MODULE PRINT — RÈGLES IMPRESSION
   ============================================================ */
@media print {
    .pillar-card { border-color: var(--milk-choco) !important; }
}


/* ============================================================
   MODULE INTERACTIF — PROGRESSION
   ============================================================ */
.progress-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0 30px;
    padding: 15px 20px;
    border-radius: 8px;
    background: var(--dark-choco);
}

.progress-bar-bg {
    flex-grow: 1;
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: 3px;
    background: var(--gold);
    transition: width 0.4s ease;
}


/* ============================================================
   MODULE INTERACTIF — GRILLE & CARTES
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (min-width: 700px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
}

.square {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1.1;
    padding: 15px;
    border-radius: 8px;
    background: var(--milk-choco);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.square.done {
    background: #2d1d16;
    border: 2px solid var(--gold);
}

.square i    { font-size: 1.8rem; margin-bottom: 10px; }
.square span { font-size: 0.75rem; text-transform: uppercase; color: var(--paper); }


/* ============================================================
   MODULE INTERACTIF — MODALE
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: rgba(0,0,0,0.85);
}

.modal-body {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 15px;
    background: var(--paper);
}

#final-loader {
    display: none;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    color: var(--gold);
}