/* ============================================================
   style_simulateur_promo.css
   Styles du Simulateur de Promotion du Livre
   S'intègre au thème Themefisher (style.css + style2.css + style3.css)
   ============================================================ */

/* ── 1. VARIABLES PALETTE (cohérentes avec style2.css / style3.css) ────────── */
:root {
    --orange:        #f9a743;
    --orange-sh:     rgba(249, 167, 67, 0.18);
    --orange-glow:   rgba(249, 167, 67, 0.45);
    --navy:          #161061;
    --text:          #3b4045;
    --muted:         #777777;
    --light-bg:      #f4f4f4;
    --white:         #ffffff;
    --border:        #dadada;
    --green:         #27ae60;
    --red:           #e74c3c;
    --radius:        5px;     /* = border-radius du thème */
}

/* ── 2. SECTION WRAPPER ──────────────────────────────────────────────────────
   Reprend .tool-section de style3.css                                        */
.promo-section {
    padding: 60px 0;
    background: var(--light-bg);
}

/* ── 3. EN-TÊTE DE L'OUTIL ───────────────────────────────────────────────────
   Même structure que .tool-header (style3.css) + .heading (style.css)        */
.promo-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeDown .6s ease both;
}

.promo-header .eyebrow {
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--orange);
    display: block;
    margin-bottom: 10px;
    font-weight: 400;
}

.promo-header h2 {
    font-size: 40px;           /* = .heading h2 du thème */
    font-weight: 600;
    line-height: 1.15;
    color: #3c3c3c;
    margin-bottom: 12px;
}
.promo-header h2 span { color: var(--orange); }

.promo-header .heading-line {
    display: block;
    width: 60px; height: 3px;
    background: var(--orange);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.promo-header p {
    font-size: 18px;           /* = p du thème */
    font-weight: 300;
    line-height: 25px;
    color: var(--muted);
}

/* Session badge — identique à style3.css */
.session-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 5px 16px;
    margin-top: 14px;
}
.session-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--orange);
    animation: sdot 2s infinite;
}
@keyframes sdot { 0%,100%{ opacity:1; } 50%{ opacity:.25; } }

/* ── 4. CARTE PRESET (dropdown de profil) ────────────────────────────────────
   Reprend .tool-card (style3.css) + .card (style2.css)                       */
.promo-preset-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
    padding: 30px 28px 26px;
    margin-bottom: 24px;
    animation: fadeUp .5s .05s ease both;
}

.promo-preset-card .tool-card-title {
    font-size: 23px;
    font-weight: 600;
    color: #3c3c3c;
    margin-bottom: 6px;
    line-height: 25px;
}
.promo-preset-card .tool-card-sub {
    font-size: 15px;
    color: var(--muted);
    font-weight: 300;
    line-height: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

/* Select du preset — hérite du select stylisé de style2.css / style3.css */
.promo-preset-select {
    width: 100%;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: 35px;
    padding: 0 40px 0 20px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f9a743' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.promo-preset-select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: none;
}

.promo-preset-hint {
    font-size: 12px;
    color: #aaa;
    font-weight: 300;
    margin-top: 8px;
}

/* ── 5. GRILLE 2 COLONNES ────────────────────────────────────────────────────
   Identique à .tool-grid (style3.css)                                        */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) {
    .promo-grid { grid-template-columns: 1fr; }
}

/* ── 6. CARTES D'ACTIONS ─────────────────────────────────────────────────────
   Reprend .tool-card (style3.css)                                            */
.promo-actions-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
    padding: 30px 28px 26px;
    animation: fadeUp .55s .1s ease both;
}

/* Titre de catégorie — style subheading du thème */
.promo-cat-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 7px;
}
.promo-cat-title:first-of-type { margin-top: 0; }

/* Ligne d'une action (checkbox) */
.promo-action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 8px;
    background: var(--light-bg);
    transition: border-color .2s, background .2s;
}
.promo-action-item:hover {
    border-color: var(--orange);
    background: #fff8f0;
}
.promo-action-item.checked {
    background: #edf6f8;
    border-color: #6ec6e6;
}

.promo-action-item input[type="checkbox"] {
    width: 16px; height: 16px;
    margin-top: 2px;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

.promo-action-icone {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.promo-action-body { flex: 1; }

.promo-action-name {
    font-size: 14px;           /* = body du thème */
    font-weight: 700;
    color: #3c3c3c;
    margin-bottom: 3px;
}

.promo-action-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}
.promo-av { color: var(--green); }
.promo-in { color: var(--red); }

/* Badge potentiel — style badge du thème */
.promo-pot {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    background: var(--orange);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 30px;
    box-shadow: 0 4px 12px var(--orange-sh);
    align-self: flex-start;
    white-space: nowrap;
    margin-top: 1px;
}

/* ── 7. BOUTON SOUMETTRE — hérite de .btn-main (.btn-generer) ────────────── */
.btn-simuler {
    width: 100%;
    margin-top: 22px;
    color: var(--white);
    border-radius: 30px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 15px 40px;
    border: none;
    background-color: var(--orange);
    box-shadow: 0 15px 40px var(--orange-glow);
    background-image: linear-gradient(to top, rgba(255,239,206,0) 0%, rgba(255,239,206,.25) 100%);
    cursor: pointer;
    transition: background-color .2s, transform .15s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-simuler:hover {
    background-color: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--orange-glow);
}
.btn-simuler:active { transform: translateY(0); }

/* ── 7b. RANGÉE DE BOUTONS (Simuler + Effacer) ───────────────────────────────
   Reprend .btn-row-tool de style3.css                                        */
.promo-btn-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: stretch;
    margin-top: 22px;
}
@media (max-width: 480px) {
    .promo-btn-row { grid-template-columns: 1fr; }
}

/* Bouton Effacer — style .btn-effacer de style3.css */
.btn-effacer {
    height: 100%;
    padding: 14px 24px;
    background: transparent;
    color: var(--muted);
    font-family: 'Josefin Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color .2s, border-color .2s, background .2s;
}
.btn-effacer:hover {
    color: var(--red);
    border-color: rgba(231,76,60,.4);
    background: rgba(231,76,60,.05);
}

/* ── 8. SECTION RÉSULTATS ────────────────────────────────────────────────────
   Cartes de résultats affichées après soumission                             */
.promo-results {
    margin-top: 32px;
    animation: fadeUp .45s ease both;
}

/* Score héro — adapté du .score-hero */
.promo-score-hero {
    text-align: center;
    padding: 30px 20px;
    background: var(--navy);
    border-radius: var(--radius);
    color: var(--white);
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(22,16,97,.25);
    position: relative;
    overflow: hidden;
}
.promo-score-hero::after {
    content: '📚';
    position: absolute; right: 20px; bottom: -8px;
    font-size: 5rem; opacity: .1;
    pointer-events: none;
}

.promo-score-label {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .75;
    margin-bottom: 8px;
    display: block;
}
.promo-score-number {
    font-family: 'Droid Serif', serif;  /* = p.price du thème */
    font-size: 64px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 10px;
}
.promo-score-number sup {
    font-size: 28px;
    color: var(--orange);
    vertical-align: super;
}
.promo-score-msg {
    font-size: 14px;
    font-weight: 300;
    opacity: .8;
    max-width: 340px;
    margin: 0 auto;
    line-height: 22px;
}

/* Carte résultats générique */
.promo-result-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
    padding: 28px;
    margin-bottom: 20px;
}
.promo-result-card .tool-card-title {
    font-size: 23px;
    font-weight: 600;
    color: #3c3c3c;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Barres de progression par catégorie */
.promo-bars { display: flex; flex-direction: column; gap: 12px; }

.promo-bar-wrap {}
.promo-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 5px;
}
.promo-bar-track {
    height: 10px;
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 35px;          /* pill = style thème */
    overflow: hidden;
}
.promo-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy), var(--orange));
    border-radius: 35px;
    transition: width .8s ease;
}

/* Grille de graphiques */
.promo-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 640px) {
    .promo-charts-grid { grid-template-columns: 1fr; }
}

.promo-chart-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
    padding: 24px 20px;
}
.promo-chart-card .tool-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #3c3c3c;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.promo-chart-canvas-wrap {
    position: relative;
    height: 250px;
}

/* ── 9. TABLEAU RÉCAPITULATIF ─────────────────────────────────────────────── */
.promo-table-wrap { overflow-x: auto; }

.promo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;            /* légèrement sous body pour densité */
    font-family: 'Josefin Sans', sans-serif;
}
.promo-table th {
    background: var(--navy);
    color: var(--white);
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.promo-table th:first-child { border-radius: var(--radius) 0 0 0; }
.promo-table th:last-child  { border-radius: 0 var(--radius) 0 0; }

.promo-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text);
    font-weight: 300;
    line-height: 1.5;
}
.promo-table tr:last-child td { border-bottom: none; }
.promo-table tr:hover td { background: #fff8f0; }

.promo-table .td-av { color: var(--green); font-size: 12px; }
.promo-table .td-in { color: var(--red);   font-size: 12px; }

/* ── 10. ALERTE CSRF ─────────────────────────────────────────────────────── */
.promo-alert-error {
    background: rgba(231,76,60,.08);
    border: 1px solid rgba(231,76,60,.25);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 14px;
    color: var(--red);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 9px;
}

/* ── 11. ÉTAT VIDE (aucune action) ────────────────────────────────────────── */
.promo-empty {
    text-align: center;
    padding: 30px 20px;
    color: #aaa;
}
.promo-empty p {
    font-size: 16px;
    line-height: 1.7;
    color: #aaa;
    font-weight: 300;
}

/* ── 12. ANIMATIONS ───────────────────────────────────────────────────────── */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: none; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
