/* FICHIER : estimation-marche/estimation-marche.css */
/* Styles specifiques : cartes checklist, grille, encadres exemple. */
/* Les styles communs (sidebar, topbar, progress bar, hamburger) viennent */
/* de shared/css/{base,sidebar,settings-panel,module,responsive,feedback}.css. */

/* ===== ZONE CONTENU ===== */
.em-container {
    padding: 24px 32px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.em-page-header {
    margin-bottom: 20px;
}

.em-page-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.em-page-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.em-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.btn-reset {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-reset:hover {
    border-color: #c47d2e;
    color: #c47d2e;
}

/* ===== GRILLE DE CARTES ===== */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.section-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.section-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.section-card.completed {
    border-color: #b0d8c0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-num {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #1a2d5a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-card.completed .card-num {
    background: #2e9e6e;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-status {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.section-card.completed .card-status {
    color: #2e9e6e;
}

/* ===== CHECKLIST ===== */
.checklist {
    list-style: none;
    margin-bottom: 14px;
}

.check-item-wrap {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.check-item-wrap:last-child {
    border-bottom: none;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.check-box {
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.check-row:hover .check-box {
    border-color: #1a2d5a;
}

.check-item-wrap.checked .check-box {
    background: #2e9e6e;
    border-color: #2e9e6e;
}

.check-item-wrap.checked .check-box::after {
    content: '';
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
    display: block;
}

.check-item-wrap.checked .check-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.check-text {
    font-size: 12.5px;
    color: var(--text-primary);
    line-height: 1.5;
}

.answer-wrap {
    margin-top: 8px;
    padding-left: 27px;
}

.answer-field {
    width: 100%;
    min-height: 60px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 12px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    line-height: 1.5;
}

.answer-field::placeholder {
    color: var(--text-secondary);
}

.answer-field:focus {
    border-color: #1a2d5a;
    background: var(--bg-secondary);
}

/* ===== ENCADRE EXEMPLE ===== */
.example-box {
    background: #fdf8f2;
    border-left: 3px solid #c47d2e;
    border-radius: 0 6px 6px 0;
    padding: 10px 12px;
    margin-top: 14px;
}

.ex-label {
    font-size: 10px;
    font-weight: 700;
    color: #c47d2e;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.example-box p {
    font-size: 11.5px;
    color: #9a7a55;
    line-height: 1.6;
}

/* ===== BOUTON AVIS FLOTTANT ===== */
.avis-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #1a6ef5;
    color: #fff;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 14px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    letter-spacing: 0.5px;
    z-index: 200;
}

/* ===== INDICATEUR DE SAUVEGARDE ===== */
.save-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2e9e6e;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 300;
    pointer-events: none;
}

.save-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .avis-btn { display: none; }
    .cards-grid { grid-template-columns: 1fr 1fr; }
    .em-container { padding: 20px 24px; }
}

@media (max-width: 768px) {
    .em-container { padding: 16px; }
    .em-page-header h1 { font-size: 17px; }
    .em-page-header p { font-size: 12px; }
    .cards-grid { grid-template-columns: 1fr; }
    .avis-btn { display: none !important; }
    .save-indicator {
        bottom: 12px;
        right: 12px;
        font-size: 12px;
        padding: 6px 12px;
    }
}
