/**
 * Styles du portail prestataires BC ACADEMY
 * Fichier CSS unifié
 */

/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --presta-primary: #0d5aa7;        /* la couleur de l'univers BC Academy */
    --presta-primary-dark: #09406f;
    --presta-secondary: #2c3e50;
    --presta-success: #27ae60;
    --presta-success-dark: #219a52;
    --presta-warning: #f39c12;
    --presta-danger: #e74c3c;
    --presta-gray-light: #ecf0f1;
    --presta-gray: #7f8c8d;
    --presta-gray-dark: #34495e;
}

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

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
    line-height: 1.5;
}

/* ============================================
   PAGE DE CONNEXION
   ============================================ */
body.login-page {
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-logo {
    width: 50%;
    max-width: 260px;
    display: block;
    margin: 0 auto 20px;
}

body.login-page .login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

body.login-page .btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.login-page .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 51, 102, 0.4);
}

body.login-page .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Neutraliser le fond violet sur mot_de_passe_oublie.php */
body.login-page.forgot-password-page {
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.login-header .presta-badge {
    margin-top: 15px;
    margin-bottom: 0;
}

.login-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.login-header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.presta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 15px;
}

/* ============================================
   FORMULAIRES
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--presta-primary);
}

/* ============================================
   BOUTONS
   ============================================ */
.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 51, 102, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-presta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
}

.btn-presta-primary {
    background: var(--presta-primary);
    color: white;
}

.btn-presta-primary:hover {
    background: var(--presta-primary-dark);
}

.btn-presta-success {
    background: var(--presta-success);
    color: white;
}

.btn-presta-success:hover {
    background: var(--presta-success-dark);
}

.btn-presta-outline {
    background: white;
    color: var(--presta-primary);
    border: 2px solid var(--presta-primary);
}

.btn-presta-outline:hover {
    background: var(--presta-primary);
    color: white;
}

.btn-clear {
    padding: 8px 16px;
    background: var(--presta-danger);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

.btn-clear:hover {
    background: #c0392b;
}

/* ============================================
   MESSAGES & ALERTES
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #f5c6cb;
}

.blocked-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.blocked-message h3 {
    margin: 0 0 10px 0;
}

.countdown {
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

.lock-message {
    background: #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.legal-notice {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.5;
}

/* ============================================
   HEADER
   ============================================ */
.presta-header {
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

.presta-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.presta-logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.presta-logo img {
    height: 40px;
}

.presta-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.presta-nav a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.presta-nav a:hover {
    opacity: 1;
}

.presta-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
}

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */
.presta-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ============================================
   CARDS SESSION
   ============================================ */
.session-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.session-card-header {
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
    color: white;
    padding: 20px;
}

.session-card-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.session-card-body {
    padding: 20px;
}

.session-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.session-info-item {
    display: flex;
    flex-direction: column;
}

.session-info-label {
    font-size: 12px;
    color: var(--presta-gray);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.session-info-value {
    font-size: 15px;
    color: var(--presta-secondary);
    font-weight: 500;
}

.session-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid var(--presta-gray-light);
}

/* ============================================
   BADGES STATUT CONTRAT
   ============================================ */
.contrat-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.contrat-status.non-signe {
    background: #ffeaa7;
    color: #b7950b;
}

.contrat-status.signe {
    background: #d4edda;
    color: #155724;
}

/* ============================================
   ÉTAT VIDE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--presta-gray);
}

.empty-state .material-symbols-outlined {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--presta-secondary);
    margin-bottom: 10px;
}

/* ============================================
   RÉSUMÉ SESSION (page contrat)
   ============================================ */
.session-summary {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.session-summary h2 {
    color: var(--presta-primary);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--presta-primary);
}

.session-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.session-summary-item label {
    display: block;
    font-size: 12px;
    color: var(--presta-gray);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.session-summary-item span {
    font-size: 15px;
    color: var(--presta-secondary);
    font-weight: 500;
}

/* ============================================
   MESSAGE DÉJÀ SIGNÉ
   ============================================ */
.already-signed {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.already-signed h2 {
    color: #155724;
    margin-bottom: 15px;
}

.already-signed p {
    color: #155724;
    margin-bottom: 20px;
}

/* ============================================
   LAYOUT SIGNATURE
   ============================================ */
.signature-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
}

/* ============================================
   VIEWER PDF
   ============================================ */
.pdf-viewer-container {
    background: var(--presta-secondary);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.pdf-viewer-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    color: white;
}

.pdf-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.pdf-navigation button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-navigation button:disabled {
    background: var(--presta-gray);
    cursor: not-allowed;
}

.pdf-navigation button:hover:not(:disabled) {
    background: #2980b9;
}

#pdf-canvas-container {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    max-height: 700px;
    overflow-y: auto;
}

#pdf-canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

/* ============================================
   BARRE DE PROGRESSION
   ============================================ */
.scroll-progress {
    margin-top: 15px;
    background: var(--presta-gray-dark);
    border-radius: 10px;
    overflow: hidden;
}

.scroll-progress-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--presta-danger), var(--presta-warning), var(--presta-success));
    width: 0%;
    transition: width 0.3s ease;
}

.scroll-progress-text {
    color: white;
    font-size: 13px;
    text-align: center;
    margin-top: 8px;
}

/* ============================================
   PANNEAU DE SIGNATURE
   ============================================ */
.signature-panel {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.signature-step {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--presta-gray-light);
}

.signature-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #bdc3c7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.step-number.active {
    background: var(--presta-primary);
}

.step-number.completed {
    background: var(--presta-success);
}

.step-title {
    font-weight: 600;
    color: var(--presta-secondary);
}

.step-subtitle {
    font-size: 13px;
    color: var(--presta-gray);
}

/* ============================================
   CANVAS DE SIGNATURE
   ============================================ */
.signature-canvas-container {
    position: relative;
    margin-bottom: 10px;
}

.signature-canvas {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
    background: #fafafa;
    display: block;
}

.signature-canvas.signed {
    border-color: var(--presta-success);
    border-style: solid;
}

.paraphe-canvas {
    width: 150px;
    height: 150px;
}

.signature-full-canvas {
    width: 100%;
    height: 150px;
}

.canvas-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ============================================
   BOUTON SOUMETTRE
   ============================================ */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--presta-success) 0%, var(--presta-success-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.2s;
    display: none;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.submit-btn.visible {
    display: block;
}

/* ============================================
   FOOTER
   ============================================ */
.presta-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--presta-gray);
    font-size: 14px;
    border-top: 1px solid var(--presta-gray-light);
    margin-top: 40px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .signature-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .presta-header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .presta-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .session-actions {
        flex-direction: column;
    }
    
    .btn-presta {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .pdf-viewer-header {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 25px;
    }
    
    .login-header h1 {
        font-size: 2em;
    }
}

/* ============================================
   PAGE MOT DE PASSE
   ============================================ */
.password-container {
    max-width: 500px;
}

.account-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--presta-primary);
}

.account-info p {
    margin: 0;
}

.account-info p:first-child {
    font-size: 18px;
    margin-bottom: 5px;
}

.account-info p:last-child {
    color: var(--presta-gray);
}

.password-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.info-text {
    color: var(--presta-gray);
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-generate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    font-size: 16px;
    background: var(--presta-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.2s;
}

.btn-generate:hover {
    background: var(--presta-primary-dark);
}

.success-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    padding: 25px;
}

.success-box h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #155724;
    margin: 0 0 15px 0;
}

.success-box h3 .material-symbols-outlined {
    color: #28a745;
}

.new-password-display {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.new-password-display .password {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: var(--presta-primary);
    letter-spacing: 2px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    word-break: break-all;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--presta-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--presta-primary-dark);
}

.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #ffc107;
}

.warning-box .material-symbols-outlined {
    color: #856404;
    flex-shrink: 0;
}

.warning-box div {
    color: #856404;
    font-size: 14px;
}

.error-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.error-box .material-symbols-outlined {
    color: #dc3545;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--presta-gray);
    text-decoration: none;
}

.back-link:hover {
    color: var(--presta-primary);
}

/* ============================================
   LAYOUT PRINCIPAL - CONTENEUR MAX-WIDTH
   ============================================ */
.main-content {
    min-height: calc(100vh - 70px - 100px); /* header + footer */
}

.main-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ============================================
   FOOTER
   ============================================ */
.presta-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--presta-gray);
    font-size: 14px;
    margin-top: 40px;
    border-top: 1px solid var(--presta-gray-light);
    background: white;
}

.presta-footer .footer-sub {
    margin-top: 5px;
    opacity: 0.7;
}

/* ============================================
   TABLEAU DE BORD
   ============================================ */
.dashboard-welcome {
    margin-bottom: 30px;
}

.dashboard-welcome h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
}

.dashboard-welcome p {
    color: var(--presta-gray);
    margin: 0;
}

.dashboard-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 250px;
    flex: 1;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.stat-card.stat-warning {
    border-left: 4px solid var(--presta-warning);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--presta-gray-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon .material-symbols-outlined {
    font-size: 32px;
    color: var(--presta-primary);
}

.stat-warning .stat-icon {
    background: #fff3cd;
}

.stat-warning .stat-icon .material-symbols-outlined {
    color: var(--presta-warning);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--presta-secondary);
    line-height: 1;
}

.stat-label {
    color: var(--presta-gray);
    margin-top: 5px;
}

.dashboard-actions h2 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    color: var(--presta-secondary);
}

.quick-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: var(--presta-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
}

.quick-link:hover {
    background: var(--presta-primary);
    color: white;
}

.quick-link .material-symbols-outlined {
    font-size: 24px;
}

@media (max-width: 768px) {
    .dashboard-stats {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: auto;
    }
    
    .quick-links {
        flex-direction: column;
    }
    
    .quick-link {
        justify-content: center;
    }
}

/* ============================================
   MENU UTILISATEUR (DROPDOWN)
   ============================================ */
.presta-user-menu {
    position: relative;
}

.presta-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    transition: background 0.2s;
}

.presta-user-btn:hover {
    background: rgba(255,255,255,0.25);
}

.presta-user-btn .arrow {
    font-size: 18px;
    transition: transform 0.2s;
}

.presta-user-dropdown.show + .presta-user-btn .arrow,
.presta-user-menu:has(.show) .arrow {
    transform: rotate(180deg);
}

.presta-user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.presta-user-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.presta-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--presta-secondary);
    text-decoration: none;
    transition: background 0.2s;
}

.presta-user-dropdown a:hover {
    background: var(--presta-gray-light);
    color: var(--presta-primary);
}

.presta-user-dropdown a .material-symbols-outlined {
    font-size: 20px;
    color: var(--presta-gray);
}

.presta-user-dropdown a:hover .material-symbols-outlined {
    color: var(--presta-primary);
}

.presta-user-dropdown hr {
    border: none;
    border-top: 1px solid var(--presta-gray-light);
    margin: 5px 0;
}

.presta-user-dropdown a.logout {
    color: var(--presta-danger);
}

.presta-user-dropdown a.logout .material-symbols-outlined {
    color: var(--presta-danger);
}

/* ============================================
   LIEN MOT DE PASSE OUBLIE (CONNEXION)
   ============================================ */
.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-password-link:hover {
    color: #764ba2;
}

/* ============================================
   NOTIFICATIONS EMAIL (MOT DE PASSE)
   ============================================ */
.email-sent-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-sent-notice .material-symbols-outlined {
    color: #155724;
}

.email-sent-notice span {
    color: #155724;
}

.email-warning-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-warning-notice .material-symbols-outlined {
    color: #856404;
}

.email-warning-notice span {
    color: #856404;
}

/* ============================================
   PAGE PROFIL
   ============================================ */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.profile-section h2 {
    color: var(--presta-primary);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--presta-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.profile-item {
    display: flex;
    flex-direction: column;
}

.profile-item.full-width {
    grid-column: 1 / -1;
}

.profile-item label {
    font-size: 12px;
    color: var(--presta-gray);
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 500;
}

.profile-item span {
    font-size: 15px;
    color: var(--presta-secondary);
}

.badge-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px !important;
    font-weight: 500;
}

.badge-type.formateur {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-type.intervenant {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Liste des contrats */
.contrats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contrat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.contrat-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contrat-info strong {
    color: var(--presta-secondary);
}

.contrat-dates,
.contrat-ref {
    font-size: 13px;
    color: var(--presta-gray);
}

.contrat-status-action {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.empty-state-small {
    text-align: center;
    padding: 30px;
    color: var(--presta-gray);
}

.empty-state-small .material-symbols-outlined {
    font-size: 48px;
    opacity: 0.5;
    display: block;
    margin-bottom: 10px;
}

/* ============================================
   PAGE MODIFIER PROFIL
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-form {
    max-width: 900px;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-section h2 {
    color: var(--presta-primary);
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

.section-info {
    color: var(--presta-gray);
    font-size: 13px;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--presta-gray-light);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input.readonly {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

.form-group small {
    font-size: 11px;
    color: var(--presta-gray);
    margin-top: 4px;
}

.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.2s;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--presta-primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.alert-danger ul {
    margin: 0;
    padding-left: 20px;
}

/* ============================================
   PAGE MOT DE PASSE OUBLIE
   ============================================ */
body.forgot-password-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.forgot-password-page .container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
}

body.forgot-password-page .logo {
    text-align: center;
    margin-bottom: 30px;
}

body.forgot-password-page .logo h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.forgot-password-page .logo p {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s;
}

.step-dot.active {
    background: #667eea;
    transform: scale(1.2);
}

.step-dot.done {
    background: #27ae60;
}

body.forgot-password-page h2 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 22px;
}

body.forgot-password-page .subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.5;
}

.code-input {
    font-size: 28px !important;
    text-align: center;
    letter-spacing: 8px;
    font-family: monospace;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.message .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

body.forgot-password-page .back-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

body.forgot-password-page .back-link:hover {
    color: #764ba2;
}

.icon-main {
    font-size: 48px;
    color: #667eea;
    text-align: center;
    display: block;
    margin-bottom: 15px;
}

.phone-display {
    background: #f0f4ff;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.phone-display .material-symbols-outlined {
    font-size: 24px;
    color: #667eea;
    vertical-align: middle;
}

.phone-display span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-left: 10px;
}

.timer {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 15px;
}

.timer strong {
    color: #e74c3c;
}

.success-icon {
    font-size: 64px;
    color: #27ae60;
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE - PAGES PROFIL & MODIFIER
   ============================================ */
@media (max-width: 768px) {
    .profile-header,
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-actions {
        width: 100%;
    }
    
    .profile-actions .btn-presta {
        flex: 1;
        justify-content: center;
    }
    
    .contrat-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contrat-status-action {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-presta {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   SESSIONS — ONGLETS & HISTORIQUE
   ======================================== */

.sessions-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--presta-gray-light);
}

.sessions-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: var(--presta-gray);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s, border-color 0.2s;
}

.sessions-tab:hover {
    color: var(--presta-primary);
}

.sessions-tab.active {
    color: var(--presta-primary);
    border-bottom-color: var(--presta-primary);
    font-weight: 600;
}

.sessions-tab .material-symbols-outlined {
    font-size: 18px;
}

.tab-count {
    background: var(--presta-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sessions-tab:not(.active) .tab-count {
    background: var(--presta-gray);
    transition: background 0.2s;
}

.sessions-tab:not(.active):hover .tab-count {
    background: var(--presta-primary);
}

/* Filtre "Type de formation" au-dessus des onglets — bloc de pastilles
   cliquables (même esprit que le toggle "type de formation" de l'admin),
   simplifié : pas de logique d'épinglage/divergence, juste "Tous" + une
   pastille icône par type, la pastille active étant surlignée. */
.type-formation-filter-align {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.type-formation-filter {
    display: inline-flex;
    align-items: stretch;
    background: var(--presta-gray-light);
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    padding: 3px;
    gap: 0;
}

.type-formation-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    min-height: 30px;
    border-radius: 999px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    line-height: 1;
}

.type-formation-filter-btn .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
    color: var(--tf-color, currentColor);
}

.type-formation-filter-btn .toggle-libelle {
    font-size: 13px;
}

.type-formation-filter-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.06);
    color: var(--presta-secondary);
}

.type-formation-filter-btn.active {
    background: linear-gradient(135deg, var(--presta-primary) 0%, var(--presta-primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(255, 51, 102, 0.3);
}

.type-formation-filter-btn.active .material-symbols-outlined {
    color: #ffffff;
}

.type-formation-filter-btn:focus-visible {
    outline: 2px solid var(--presta-primary);
    outline-offset: 2px;
}

/* Session passée — carte légèrement atténuée */
.session-card-passee {
    opacity: 0.90;
    border-left: 4px solid var(--presta-gray);
}

.session-card-passee .session-card-header {
    background: linear-gradient(135deg, var(--presta-gray) 0%, #5a6472 100%);
}

.session-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.badge-passee {
    font-size: 11px;
    font-weight: 600;
    background: var(--presta-gray-light);
    color: var(--presta-gray);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Bloc info numéro formateur */
.info-box-formateur {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #eef4ff;
    border: 1px solid #c7d9f9;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.info-box-icon .material-symbols-outlined {
    font-size: 32px;
    color: #3b6fd4;
}

.info-box-content strong {
    display: block;
    color: #2a4fa0;
    margin-bottom: 4px;
}

.info-box-content p {
    margin: 0;
    color: #3d5a99;
    font-size: 14px;
    line-height: 1.5;
}

/* Stat card — sessions passées */
.stat-card.stat-historique {
    border-left: 4px solid var(--presta-gray);
}

.stat-historique .stat-icon {
    background: var(--presta-gray-light);
}

.stat-historique .stat-icon .material-symbols-outlined {
    color: var(--presta-gray);
}

/* ============================================
   PAGE RÉPARTITION DES FRAIS
   ============================================ */
.repartition-page-header {
    margin-bottom: 28px;
}
.repartition-page-header h1 {
    margin: 14px 0 6px;
    font-size: 1.5rem;
    color: var(--presta-secondary);
}
.repartition-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--presta-gray);
    font-size: 14px;
}
.repartition-dates .material-symbols-outlined {
    font-size: 16px;
}

/* Statistiques */
.repartition-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.repartition-stat-box {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.repartition-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.repartition-stat-icon .material-symbols-outlined { font-size: 22px; color: white; }
.repartition-stat-icon.blue   { background: #3498db; }
.repartition-stat-icon.red    { background: var(--presta-danger); }
.repartition-stat-icon.green  { background: var(--presta-success); }
.repartition-stat-icon.orange { background: var(--presta-warning); }
.repartition-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--presta-secondary);
}
.repartition-stat-label {
    font-size: 12px;
    color: var(--presta-gray);
    margin-top: 2px;
}

/* Section */
.repartition-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.repartition-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--presta-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2.5px solid var(--presta-primary);
}

/* Cartes prestataires */
.repartition-prestataires-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 768px) {
    .repartition-prestataires-grid {
        grid-template-columns: 1fr;
    }
}
.repartition-presta-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--presta-gray-light);
}
.repartition-presta-card.type-formateur { border-left: 4px solid var(--presta-primary); }
.repartition-presta-card.type-intervenant { border-left: 4px solid #3498db; }
.repartition-presta-header {
    padding: 12px 16px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.repartition-presta-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--presta-gray);
    font-weight: 600;
}
.repartition-presta-name {
    font-weight: 700;
    color: var(--presta-secondary);
    font-size: 15px;
}
.repartition-presta-details {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.repartition-presta-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
}
.repartition-presta-row span:last-child { font-weight: 600; }
.repartition-presta-total {
    border-top: 1px solid var(--presta-gray-light);
    padding-top: 8px;
    margin-top: 4px;
    font-weight: 700;
    color: var(--presta-secondary);
}

/* Tableau */
.repartition-table-wrap {
    overflow-x: auto;
}
.repartition-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.repartition-table th {
    background: #f8f9fa;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--presta-secondary);
    border-bottom: 2px solid var(--presta-gray-light);
    white-space: nowrap;
}
.repartition-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--presta-gray-light);
    vertical-align: middle;
}
.repartition-table tr:last-child td { border-bottom: none; }
.repartition-table tr:hover td { background: #fafafa; }
.td-right  { text-align: right !important; }
.td-center { text-align: center !important; }
.text-danger  { color: var(--presta-danger); }
.text-success { color: var(--presta-success); }
.text-muted   { color: var(--presta-gray); }

/* Badges */
.repartition-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.repartition-badge-success { background: #d4edda; color: #155724; }
.repartition-badge-danger  { background: #f8d7da; color: #721c24; }

/* repartition_frais_session - classes remplaçant les styles inline */
.td-right, .td-center         { white-space: nowrap; }
.td-frais                     { white-space: nowrap; text-align: right !important; color: var(--presta-danger); }
.td-net                       { white-space: nowrap; text-align: right !important; color: var(--presta-success); }
.repartition-icon-sm          { font-size: 14px !important; vertical-align: middle; }
.funding-credit               { font-size: 8px; font-weight: 700; margin-right: 2px; color: #c0392b; }
.funding-debit                { font-size: 8px; font-weight: 700; margin-right: 2px; }

/* Centrage global des en-têtes de tableau */
th { text-align: center !important; }

/* ─── Classes utilitaires importées d'admin/style_admin.css ──────────
   Ces classes sont nécessaires pour l'affichage des badges Visio/Replay
   sur la colonne Lieu des sessions presta (cf. sessions.php → render_session_card).
   Définitions identiques à celles d'admin pour cohérence visuelle. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-info       { background: #d1ecf1; color: #0c5460; }
.badge-secondary  { background: #6c757d; color: white; }
.badge-link       { cursor: pointer; text-decoration: none; transition: opacity 0.15s; }
.badge-link:hover { opacity: 0.85; }
.badge-link-off   { cursor: default; opacity: 0.6; }

/* Utilities */
.va-middle { vertical-align: middle; }
.fs-16     { font-size: 16px; }

/* Icône à côté du label "Dates / Durée / Lieu / Inscrits" dans
   render_session_card — remplace les inline style="font-size:16px;vertical-align:middle". */
.session-info-icon {
    font-size: 16px;
    vertical-align: middle;
}

/* Titre et chapô standards des pages presta (cf. sessions.php notamment).
   À réutiliser sur les autres pages presta pour cohérence visuelle. */
.page-title {
    margin-bottom: 10px;
}
.page-lead {
    color: #7f8c8d;
    margin-bottom: 24px;
}

/* Badge de rôle dans le header presta (cf. entete.php).
   Positionne le badge à côté du bouton de menu utilisateur avec un espacement
   raisonnable et un alignement vertical correct. */
.presta-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

/* Sur mobile : le badge reste lisible mais plus compact */
@media (max-width: 600px) {
    .presta-role-badge {
        font-size: 11px !important;
        padding: 3px 8px;
        margin-right: 6px;
    }
}

/* Groupes repliables "Réglées / Non réglées" (onglet Sessions passées) */
.reglement-group {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.reglement-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0;
}

.reglement-group-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reglement-group-header-en_cours {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.reglement-group-header-attente_reglement {
    background: linear-gradient(135deg, #f39c12 0%, #d4860a 100%);
}

.reglement-group-header-reglees {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.reglement-group-header .tab-count {
    background: rgba(255,255,255,0.3);
}

.reglement-group-content {
    padding: 16px;
}

.reglement-group-content .session-card {
    margin-bottom: 16px;
}

.reglement-group-content .session-card:last-child {
    margin-bottom: 0;
}

.reglement-group-content.collapsed,
.reglement-group-content[style*="display: none"] {
    display: none;
    padding: 0;
}

/* Bouton danger (suppression de photo de profil) */
.btn-presta-danger.btn-presta-outline {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-presta-danger.btn-presta-outline:hover {
    background: #dc3545;
    color: white;
}

/* ════════════════════════════════════════════════════════════════════════
   IDENTITÉ EMPRUNTÉE — LE BANDEAU        28/09/2026
   ════════════════════════════════════════════════════════════════════════

 ⚠ CE BLOC EST CELUI DU SITE PUBLIC, REPRIS À L'IDENTIQUE. Le portail
   prestataires n'a aucune raison d'avertir autrement que le site public :
   mêmes classes, mêmes couleurs, même place. Le bandeau du portail était
   sombre et en haut ; il est désormais rouge et en bas, comme celui des
   apprenants.

   La première version l'écrivait en `style="…"` dans le PHP, ce qui est
   deux fois fautif : ces règles ont leur place ici, et un bandeau dessiné
   à deux endroits différents finit toujours par diverger.

   Si vous modifiez ce bloc, modifiez aussi celui de style.css — les deux
   étaient rigoureusement identiques au 28/09/2026 (md5 vérifié).
   ════════════════════════════════════════════════════════════════════════ */

.emprunt-bandeau {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 18px;
    background: #b71c1c;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .35);
}

.emprunt-bandeau strong {
    color: #fff;
    text-decoration: underline;
}

.emprunt-bandeau-depuis {
    opacity: .8;
    font-size: 13px;
}

.emprunt-bandeau-sortie,
.emprunt-bandeau-sortie:link,
.emprunt-bandeau-sortie:visited {
    flex: 0 0 auto;
    padding: 7px 16px;
    border: 2px solid #fff;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.emprunt-bandeau-sortie:hover,
.emprunt-bandeau-sortie:focus {
    background: #fff;
    color: #b71c1c;
}

body:has(.emprunt-bandeau) {
    padding-bottom: 80px;
}

/* ⚠ LE BANDEAU CHANGE DE TON QUAND UN ESSAI RESTE À ANNULER — 11/09/2026.
     Le rouge sombre est l'état ordinaire de l'emprunt ; celui-ci, plus vif
     et clignotant une fois, dit qu'il reste un geste à faire. Sans ce
     changement, le bouton « Annuler » s'ajouterait dans un bandeau
     identique et passerait inaperçu — c'est-à-dire qu'on sortirait en
     laissant une signature d'essai au nom d'un inscrit. */
.emprunt-bandeau-alerte {
    background: #d32f2f;
    animation: emprunt-attire 1.2s ease-in-out 2;
}

@keyframes emprunt-attire {
    0%, 100% { background: #d32f2f; }
    50%      { background: #ff6f00; }
}

/* ⚠ RESPECTE LE RÉGLAGE « RÉDUIRE LES ANIMATIONS » du système. Une
     animation qui clignote peut gêner, voire déclencher un malaise chez
     certaines personnes ; la couleur suffit à distinguer les deux états. */
@media (prefers-reduced-motion: reduce) {
    .emprunt-bandeau-alerte { animation: none; }
}

.emprunt-bandeau-annuler,
.emprunt-bandeau-annuler:link,
.emprunt-bandeau-annuler:visited {
    flex: 0 0 auto;
    padding: 7px 16px;
    border: 2px solid #fff;
    border-radius: 4px;
    background: #fff;
    color: #b71c1c;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.emprunt-bandeau-annuler:hover,
.emprunt-bandeau-annuler:focus {
    background: #ffe0b2;
    color: #7f0000;
}
