/* =============================================
   ENTRETIENS M2 — Feuille de style principale
   Compatible Hostinger (Apache + PHP)
   ============================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f0f4f8;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 48px;
}

/* ---- Conteneur principal ---- */
.container {
    width: 100%;
    max-width: 560px;
}

/* ---- Header ---- */
header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 24px;
}

/* ---- Stepper ---- */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 8px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    flex-shrink: 0;
}

.step-dot.active {
    background: #1e3a5f;
    color: #fff;
}

.step-dot.done {
    background: #22c55e;
    color: #fff;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    max-width: 60px;
    transition: background 0.3s;
}

.step-line.done {
    background: #22c55e;
}

.step-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    margin-top: 6px;
}

.step-labels span {
    font-size: 10px;
    color: #94a3b8;
    width: 32px;
    text-align: center;
    line-height: 1.3;
}

/* ---- Utilitaire hidden (applicable à tous les éléments) ---- */
.hidden { display: none !important; }

/* ---- Écrans ---- */
.screen { display: block; }

/* ---- Card ---- */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
    text-align: center;
}

.card-error {
    border-top: 4px solid #ef4444;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

.card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 12px;
}

.card p {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

/* ---- Formulaire ---- */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}

.form-group input:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
    background: #fff;
}

.form-error {
    margin-top: 8px;
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
}

.form-error.hidden { display: none; }

/* ---- Boutons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.btn-primary:hover { background: #162d4a; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 20px;
    background: transparent;
    color: #1e3a5f;
    border: 1.5px solid #1e3a5f;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}

.btn-secondary:hover { background: #f0f4f8; }

.btn-meet {
    background: #16a34a;
    font-size: 16px;
    padding: 15px 20px;
}
.btn-meet:hover { background: #15803d; }

/* ---- Badge REC ---- */
.rec-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* ---- Loader spinner ---- */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.loader.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Listes ---- */
.checklist {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}

.checklist li {
    font-size: 14px;
    color: #475569;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.5;
}

.checklist li:last-child { border-bottom: none; }

.steps-ordered {
    text-align: left;
    padding-left: 20px;
    margin-bottom: 20px;
}

.steps-ordered li {
    font-size: 14px;
    color: #475569;
    padding: 7px 0;
    line-height: 1.5;
}

/* ---- Info boxes ---- */
.info-box {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13px;
    color: #1e40af;
    text-align: left;
    margin-bottom: 20px;
    line-height: 1.6;
}

.info-box.warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.info-box.success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

/* ---- Hint ---- */
.hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
    line-height: 1.5;
}

/* ---- Question marker (visible dans l'enregistrement Daily) ---- */
.question-marker {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1e3a5f;
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: -4px;
}

.question-marker.hidden { display: none; }

#marker-num {
    background: #f59e0b;
    color: #1e293b;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

#marker-titre {
    opacity: 0.92;
    font-size: 13px;
}

/* ---- Waiting label ---- */
.q-waiting-label {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 20px;
}

/* ---- Question text ---- */
.q-text {
    background: #f8fafc;
    border-left: 4px solid #1e3a5f;
    border-radius: 6px;
    padding: 20px 22px;
    font-size: 19px;
    font-weight: 500;
    color: #1e293b;
    text-align: left;
    line-height: 1.75;
    margin-bottom: 20px;
}

/* ---- Outils (Q7b_high) ---- */
.tool-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0 0 20px;
    justify-content: center;
}

.tool-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    padding: 6px 14px 6px 10px;
    font-size: 13px;
    font-weight: 600;
}

.tool-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---- Timer ---- */
.q-timer-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.q-timer-container.hidden { display: none; }

.q-timer-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.q-timer-bar {
    height: 100%;
    width: 100%;
    background: #16a34a;
    border-radius: 4px;
    transition: width 0.9s linear, background 0.5s;
}

.q-timer-text {
    font-size: 15px;
    font-weight: 700;
    min-width: 38px;
    text-align: right;
    color: #16a34a;
    transition: color 0.5s;
}

/* ---- QCM Choix ---- */
.q-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.q-choices.hidden { display: none; }

.choice-btn {
    padding: 12px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}

.choice-btn:hover {
    border-color: #1e3a5f;
    background: #eff6ff;
}

.choice-btn.selected {
    border-color: #1e3a5f;
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
}

/* ---- Footer ---- */
footer {
    text-align: center;
    margin-top: 24px;
}

footer p {
    font-size: 11px;
    color: #cbd5e1;
    letter-spacing: 0.04em;
}

/* ---- Responsive mobile ---- */
/* ---- Visio checklist (écran 3) ---- */
.visio-checklist {
    margin: 1rem 0 1.25rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #1e293b;
    text-align: left;
}

.visio-checklist li { padding-left: 4px; }

.visio-warn {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
}

/* ---- Step actions (écran bienvenue) ---- */
.step-action {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.step-action-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-action-body {
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
}

.step-action-body strong {
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
}

/* ---- RGPD Consent ---- */
.rgpd-consent {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.rgpd-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.rgpd-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.rgpd-details {
    margin-top: 10px;
}

.rgpd-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #2563eb;
    cursor: pointer;
    text-decoration: underline;
}

.rgpd-toggle:hover { color: #1d4ed8; }

.rgpd-text {
    margin-top: 10px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rgpd-text p { margin: 0; }
.rgpd-text a { color: #2563eb; }

#btn-auth:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    body { padding: 16px 12px 32px; }
    .card { padding: 28px 20px; }
    .card h2 { font-size: 19px; }
}
