/* Modale détails du trajet : style compact */
#ride-details-modal .modal-content {
    height: auto;
    max-height: calc(100vh - 20px);
}
#ride-details-modal .modal-body {
    padding-top: 10px;
    padding-bottom: 5px;
    padding-left: 12px;
    padding-right: 12px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
#ride-details-modal .modal-body > * {
    margin-top: 8px;
    margin-bottom: 8px;
}
#ride-details-modal .modal-title {
    margin-bottom: 8px;
}

/* Paysage mobile : réduire la carte et améliorer la scrollbar */
@media (orientation: landscape) and (max-height: 500px) {
    #contact-map.map-visible {
        height: 180px;
    }
    #ride-details-modal .modal-body {
        scrollbar-width: 15px;
    }
    #ride-details-modal .modal-body::-webkit-scrollbar {
        width: 15px;
    }
    #ride-details-modal .modal-body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    #ride-details-modal .modal-body::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }
    #ride-details-modal .modal-body::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}
/*
 * inline-refactor.css
 * Classes utilitaires créées pour remplacer les attributs `style="..."`
 * inline présents dans les pages PHP/HTML et les templates JS, afin de
 * permettre la suppression de `'unsafe-inline'` de la directive CSP
 * `style-src`.
 */

/* ============================================================
 * event.php – Activation, messages, modales
 * ============================================================ */
.activation-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.activation-form-container {
    flex: 1;
    min-width: 300px;
}

.address-search-container {
    position: relative;
}

.address-suggestions-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.address-search-help {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.use-my-location-btn {
    color: var(--theme-color);
    text-decoration: none;
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.use-my-location-btn:first-child {
    justify-self: flex-start;
}

.map-help-link {
    justify-self: flex-end;
}

.use-my-location-btn-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.text-warning-bold {
    color: red;
    font-weight: bold;
}

.btn-activate-space {
    font-size: 1.1rem;
    padding: 15px;
    margin-top: 10px;
}

.activation-map-container {
    flex: 2;
    min-width: 400px;
}

.activation-map-header {
    margin-bottom: 10px;
    text-align: center;
}

#map-activation {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.notice-deletion {
    color: red;
}

.accueil-welcome {
    text-align: center;
    padding: 20px;
}

.view-controls-hidden {
    display: none;
}

.rides-container-hidden {
    display: none;
}

#rides-map {
    height: 300px;
    border-radius: 8px;
}

#contact-map.map-visible {
    height: 250px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.text-muted-small {
    font-size: 0.85rem;
}

.btn-send-message-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* #conversation-modal .modal-content width/max-width removed: now unified by global .modal-content rule */

.conversation-modal-body {
    padding: 0;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.conversation-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    font-size: 14px;
}

.conversation-message-form {
    padding: 10px;
    border-top: 1px solid #dee2e6;
    background: white;
}

@media (max-width: 768px) {
    #conversation-modal .modal-content {
        height: 100dvh !important;
        min-height: 0 !important;
    }

    #conversation-modal .conversation-modal-body {
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
    }

    #conversation-modal .conversation-messages-container {
        min-height: 0 !important;
        max-height: none !important;
        flex: 1 1 auto !important;
    }

    #conversation-modal .conversation-message-form {
        flex: 0 0 auto !important;
        padding: 5px 8px max(5px, env(safe-area-inset-bottom)) !important;
    }

    #conversation-modal .modal-header {
        padding: .55rem .8rem !important;
    }

    #conversation-modal .modal-title {
        font-size: .98rem;
        line-height: 1.15;
    }

    #conversation-modal .reservation-action-bar {
        gap: .3rem;
        padding: .3rem .5rem;
        margin-bottom: .15rem;
    }

    #conversation-modal .reservation-action-bar .reservation-btn,
    #conversation-modal .reservation-action-bar .reservation-status {
        padding: .25rem .55rem;
        font-size: .78rem;
    }

    #conversation-modal .conversation-messages-container {
        padding: 6px;
    }

    #conversation-modal .message {
        margin-bottom: 2px;
    }

    #conversation-modal .message-bubble {
        padding: 5px 9px;
        font-size: .86rem;
    }

    #conversation-modal .message.system {
        margin: 5px 0;
    }

    #conversation-modal .conversation-input,
    #conversation-modal .conversation-send-btn {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

.conversation-form-group {
    display: flex;
    gap: 8px;
    margin-bottom: 0 !important;
}

.conversation-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 14px;
}

.conversation-send-btn {
    padding: 8px 16px;
    background: #a65902;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.conversation-counter-wrap {
    text-align: right;
    margin-top: 5px;
}

.conversation-messaging-notice {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 7px 2px 0;
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.35;
}

.conversation-messaging-notice i {
    flex: 0 0 auto;
    margin-top: 1px;
}

/* ============================================================
 * attestation_email.php
 * ============================================================ */
.ride-request-info {
    margin-top: 10px;
    font-size: 0.9em;
}

.attestation-form-box {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #4a90e2;
}

.attestation-form-box h4 {
    margin: 0 0 10px 0;
    color: #4a90e2;
}

.attestation-form-box p {
    margin: 0 0 10px 0;
}

.attestation-form-box .download-link {
    display: inline-block;
    background: #4a90e2;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.attestation-form-box .download-note {
    margin: 10px 0 0 0;
    font-size: 0.85em;
    color: #666;
}

.pdf-upload-input {
    border: 2px dashed #ddd;
    padding: 15px;
    background: #f9f9f9;
}

.pdf-upload-hint {
    color: #666;
    font-size: 0.85em;
}

/* ============================================================
 * map-utils.js – popup contact
 * ============================================================ */
.popup-contact-link {
    display: inline-block;
    margin-top: 8px;
    color: #007bff;
    text-decoration: none;
}

/* ============================================================
 * ui-manager.js – fiche trajet, contacts conducteur
 * ============================================================ */
.ride-info-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.driver-contact-box {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.driver-contact-text {
    margin: 0;
    font-size: 0.75rem;
    color: #333;
}

.driver-contact-empty {
    text-align: center;
    color: #666;
    padding: 10px;
}

.driver-contact-empty p,
.driver-contact-error p {
    margin: 0;
}

.driver-contact-empty .sub,
.driver-contact-error .sub {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
}

.driver-contact-error {
    text-align: center;
    color: #dc3545;
    padding: 10px;
}

/* ============================================================
 * rides-manager.js – état "premier utilisateur"
 * ============================================================ */
.first-user-welcome {
    text-align: center;
    padding: 20px;
}

.first-user-welcome h4 {
    color: #28a745;
    margin-bottom: 20px;
    font-weight: bold;
}

.first-user-welcome .lead {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #495057;
}

.first-user-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.first-user-card h6 {
    margin-bottom: 10px;
    color: #28a745;
}

.first-user-card .small-text {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.first-user-link-box {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.first-user-link-box code {
    word-break: break-all;
    font-size: 0.85rem;
}

.first-user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.first-user-actions .btn {
    min-width: 150px;
}

.first-user-footer {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 15px;
}

.first-user-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-error {
    color: #dc3545;
}

/* ============================================================
 * app.js – chargement, gestion utilisateur, "Mes trajets"
 * ============================================================ */
.search-loading {
    text-align: center;
    padding: 40px 20px;
}

.search-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.search-loading .loading-text {
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.user-mgmt-wrap {
    padding: 20px;
}

.alert-box-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.alert-box-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.user-mgmt-actions {
    text-align: center;
}

.btn-delete-user {
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.btn-home-link {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.btn-retry {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.my-ride-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.my-ride-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-ride-meta {
    color: #666;
}

.btn-ride-details {
    font-size: 12px;
    padding: 4px 8px;
}

.manage-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.manage-message-date {
    color: #666;
}

.manage-message-body {
    margin-bottom: 8px;
}

.manage-message-contact {
    font-size: 0.9em;
    color: #666;
}

.manage-messages-empty {
    color: #666;
    font-style: italic;
}

/* ============================================================
 * manage-ride-updater.js – messages reçus
 * ============================================================ */
.received-message {
    margin-left: 0;
    margin-right: auto;
}

.received-message-content {
    text-align: left;
    line-height: 1.4;
}

.received-message-date {
    text-align: right;
    margin-top: 8px;
    margin-bottom: 0;
}

.received-messages-empty {
    font-style: italic;
}

/* ============================================================
 * Mes espaces personnels m�moris�s (localStorage chiffr�)
 * Cartes affich�es sur index.html et dans l'onglet "Mon espace".
 * ============================================================ */
.my-spaces-card {
    border-left: 4px solid #2c7be5;
}
.my-spaces-intro {
    margin-bottom: .75rem;
}
.my-spaces-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.my-space-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .25rem;
    border-top: 1px solid #eee;
}
.my-space-item:first-child { border-top: 0; }
.my-space-link {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: inherit;
    padding: .25rem .25rem;
    border-radius: 4px;
}
.my-space-link:hover { background: #f4f7fb; }
.my-space-label { font-weight: 600; }
.my-space-pseudo {
    color: #6c757d;
    font-size: .9em;
    margin-left: auto;
}
.my-space-forget {
    background: transparent;
    border: 1px solid transparent;
    color: #6c757d;
    cursor: pointer;
    padding: .25rem .5rem;
    border-radius: 4px;
    line-height: 1;
}
.my-space-forget:hover {
    background: #fdecec;
    color: #c0392b;
    border-color: #f5c6cb;
}
.memorize-space-status { margin: .5rem 0; }
.memorize-space-saved { color: #1e7e34; margin: 0; }
.memorize-space-not-saved { margin: 0; }


/* ============================================================
 * Onglet "Mon espace" � version compacte (r�duit les espaces
 * verticaux des cartes, titres, alertes, listes).
 * ============================================================ */
#user-management-tab .card {
    margin-bottom: .5rem;
}
#user-management-tab .card h2,
#user-management-tab .card h3 {
    padding: .5rem .9rem;
    font-size: 1rem;
}
#user-management-tab .card > p,
#user-management-tab .card > .text-muted {
    margin: .25rem .9rem;
}
#user-management-tab .user-mgmt-wrap {
    padding: .35rem .9rem .5rem;
}
#user-management-tab .alert-box-danger,
#user-management-tab .alert-box-success {
    padding: .5rem .75rem;
    margin: .5rem 0;
}
#user-management-tab .alert-box-danger h5,
#user-management-tab .alert-box-success h4 {
    margin: 0 0 .25rem 0;
    font-size: 1rem;
}
#user-management-tab .alert-box-danger p,
#user-management-tab .alert-box-success p {
    margin: 0;
}
#user-management-tab .user-mgmt-actions {
    margin-top: .5rem;
}
#user-management-tab .btn-delete-user {
    padding: .5rem 1rem;
}
#user-management-tab #memorize-space-card .memorize-space-status,
#user-management-tab #memorize-space-card .form-help {
    margin: .35rem 0;
}
#user-management-tab #my-reservations-content {
    padding: .15rem .9rem .35rem;
}
#user-management-tab #my-reservations-content > * + * {
    margin-top: .25rem;
}

#email-notifications-card .email-notif-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
}

#email-notifications-card .email-notif-title {
    margin: 0;
}

#email-notifications-card .email-notif-toggle-wrap {
    display: flex;
    align-items: center;
}

#email-notifications-card .email-notif-toggle-btn {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .45rem;
}

#email-notifications-card .email-notif-input-row {
    display: flex;
    align-items: center;
    gap: .45rem;
}

#email-notifications-card .email-notif-input-row .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

#email-notifications-card #save-notif-email-btn {
    flex: 0 0 auto;
    width: 2rem !important;
    min-width: 2rem !important;
    height: 2rem;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .45rem;
}

#email-notifications-card .email-notif-helper {
    display: block;
    margin-top: .3rem;
    line-height: 1.15;
    font-size: .74rem;
}

#email-notifications-card .email-notif-status-inline {
    margin: 0 0 .25rem 0;
    color: #c62828 !important;
    font-weight: 700;
}

@media (max-width: 768px) {
    #email-notifications-card .email-notif-header {
        gap: .4rem;
    }

    #email-notifications-card h2 {
        font-size: .95rem;
        line-height: 1.15;
    }

    #email-notifications-card .email-notif-input-row {
        gap: .35rem;
    }

    #email-notifications-card .email-notif-helper {
        margin-top: .25rem;
        line-height: 1.08;
        font-size: .7rem;
    }

    #email-notifications-card .user-mgmt-actions {
        margin-top: .35rem;
    }
}


/* ============================================================
 * Onglet "Conversations" - version compacte
 * ============================================================ */
#messages-tab .card {
    margin-bottom: .5rem;
}

#messages-tab .card h2,
#messages-tab .card h3 {
    padding: .5rem .9rem;
    font-size: 1rem;
}

#messages-tab #messaging-content {
    padding: .2rem .75rem .5rem;
}

#messages-tab .conversations-list .ride-card.conversation-card {
    padding: .55rem .75rem;
    margin-bottom: .45rem;
    border-radius: 7px !important;
}

#messages-tab .conversations-list .ride-title {
    margin-bottom: .15rem;
    line-height: 1.2;
}

#messages-tab .conversations-list .text-muted {
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    #messages-tab .card {
        margin-bottom: .35rem;
    }

    #messages-tab .card h2,
    #messages-tab .card h3 {
        padding: .4rem .75rem;
        font-size: .95rem;
    }

    #messages-tab #messaging-content {
        padding: .1rem .5rem .35rem;
    }

    #messages-tab .conversations-list .ride-card.conversation-card {
        padding: .45rem .6rem;
        margin-bottom: .3rem;
        border-radius: 6px !important;
    }

    #messages-tab .conversations-list .ride-title {
        margin-bottom: .1rem;
        font-size: .95rem;
    }

    #messages-tab .conversations-list .text-muted {
        font-size: .8rem;
        line-height: 1.15;
    }
}


/* ============================================================
 * Lien "Comment ça marche ?" dans l'en-tête de l'accueil
 * (fond brun #a65902 : on force un blanc lisible + cadre)
 * ============================================================ */
.header-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding-right: .5rem;
}
.header-help-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    line-height: 1.1;
    transition: background-color .15s ease, transform .15s ease;
    /* Compat <button> : neutraliser styles natifs */
    font-family: inherit;
    cursor: pointer;
}
button.header-help-link { appearance: none; -webkit-appearance: none; }
.header-help-link i {
    font-size: 1rem;
}
/* Caractère "?" de secours (au cas où Font Awesome ne charge pas).
   Affiché uniquement sur mobile dans la pastille blanche. */
.header-help-fallback {
    display: none;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1;
}
.header-help-link:hover,
.header-help-link:focus {
    background: rgba(255, 255, 255, 0.30);
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}
@media (max-width: 540px) {
    .header-help-label { display: none; }
    /* Pastille blanche pleine, "?" marron très contrasté.
       Plus visible que le simple texte blanc sur fond brun. */
    .header-help-link {
        width: 36px;
        height: 36px;
        padding: 0;
        background: #ffffff;
        border-color: #ffffff;
        color: #a65902;
        justify-content: center;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    }
    .header-help-link i { color: #a65902; font-size: 1.15rem; }
    .header-help-link:hover,
    .header-help-link:focus {
        background: #fff8ee;
        color: #a65902;
    }
}
/* Si Font Awesome n'est pas chargé (i sans glyphe rendu),
   on affiche le "?" texte de secours sur mobile. */
@media (max-width: 540px) {
    .header-help-fallback { display: inline; }
    .header-help-link i + .header-help-fallback { display: none; }
}

    /* ============================================================
     * Uniformisation globale des modales
     * Base visuelle commune pour toutes les pages qui chargent
     * inline-refactor.css (index, event, pages d'entree).
     * ============================================================ */
    :root {
        --modal-radius: 14px;
        --modal-border: 1px solid #dfe5ec;
        --modal-shadow: 0 18px 52px rgba(14, 28, 45, 0.28);
        --modal-bg: #ffffff;
        --modal-chrome-bg: #f7f9fc;
        --modal-divider: #e5e9ef;
        --modal-motion: 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
    }

    .modal {
        background: rgba(5, 16, 30, 0.56);
        backdrop-filter: blur(2px);
        z-index: 12000;
        transition: opacity var(--modal-motion);
    }

    .modal-content {
        background: var(--modal-bg);
        border: var(--modal-border);
        border-radius: var(--modal-radius);
        box-shadow: var(--modal-shadow);
        overflow: hidden;
        transform: translateY(12px) scale(0.98);
        opacity: 0.92;
        transition: transform var(--modal-motion), opacity var(--modal-motion);
    }

    .modal.active .modal-content {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .modal-header {
        padding: 1rem 1.25rem;
        background: var(--modal-chrome-bg);
        border-bottom: 1px solid var(--modal-divider);
    }

    .modal-title {
        font-size: 1.1rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-footer,
    .map-modal-footer {
        padding: 0.9rem 1.25rem;
        border-top: 1px solid var(--modal-divider);
        background: var(--modal-chrome-bg);
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 0.6rem;
        text-align: right;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.55rem;
        color: #526274;
        border: 1px solid transparent;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .modal-close:hover,
    .modal-close:focus {
        background: #eef3f8;
        border-color: #d7e0ea;
        color: #24364a;
        outline: none;
    }

    #help-modal .modal-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    #help-modal .modal-title {
        flex: 1;
        margin: 0;
    }

    .modal-icon-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: 1px solid transparent;
        background: transparent;
        color: #526274;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .modal-icon-btn:hover,
    .modal-icon-btn:focus {
        background: #eef3f8;
        border-color: #d7e0ea;
        color: #24364a;
        outline: none;
    }

    .modal-help-contact-btn {
        color: #111;
    }

    .modal-help-stats-btn {
        color: #0f766e;
    }

    #help-modal .modal-help-contact-btn i,
    #help-modal .modal-help-contact-btn .fas,
    #help-modal .modal-help-contact-btn .fa-solid,
    #help-modal .modal-help-contact-btn .fa-regular {
        color: #111 !important;
    }

    .modal-help-contact-btn:hover,
    .modal-help-contact-btn:focus {
        color: #000;
    }

    .modal-help-stats-btn:hover,
    .modal-help-stats-btn:focus {
        color: #0b5a54;
    }

    #help-modal .modal-help-contact-btn:hover i,
    #help-modal .modal-help-contact-btn:focus i,
    #help-modal .modal-help-contact-btn:hover .fas,
    #help-modal .modal-help-contact-btn:focus .fas,
    #help-modal .modal-help-contact-btn:hover .fa-solid,
    #help-modal .modal-help-contact-btn:focus .fa-solid,
    #help-modal .modal-help-contact-btn:hover .fa-regular,
    #help-modal .modal-help-contact-btn:focus .fa-regular {
        color: #000 !important;
    }

    #help-modal .modal-help-stats-btn i,
    #help-modal .modal-help-stats-btn .fas,
    #help-modal .modal-help-stats-btn .fa-solid,
    #help-modal .modal-help-stats-btn .fa-regular {
        color: #0f766e !important;
    }

    #help-modal .modal-help-stats-btn:hover i,
    #help-modal .modal-help-stats-btn:focus i,
    #help-modal .modal-help-stats-btn:hover .fas,
    #help-modal .modal-help-stats-btn:focus .fas,
    #help-modal .modal-help-stats-btn:hover .fa-solid,
    #help-modal .modal-help-stats-btn:focus .fa-solid,
    #help-modal .modal-help-stats-btn:hover .fa-regular,
    #help-modal .modal-help-stats-btn:focus .fa-regular {
        color: #0b5a54 !important;
    }

    .support-contact-form .form-group {
        margin-bottom: 0.9rem;
    }

    .support-contact-label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.35rem;
    }

    .support-contact-note {
        font-size: 0.9rem;
        margin: 0.4rem 0 0;
    }

    #support-modal .map-modal-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    #support-modal .map-modal-footer .btn {
        width: 100%;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .modal-header,
    .gdpr-modal-header {
        touch-action: pan-y;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
    }

    .modal-swiping {
        cursor: grabbing;
    }

    .modal-dragging {
        transition: none !important;
    }

    .modal-swipe-dismiss {
        transform: translateY(100%) !important;
        opacity: 0 !important;
        transition: transform var(--modal-motion), opacity var(--modal-motion) !important;
    }

    @media (max-width: 768px) {
        .modal-content {
            width: 94%;
            max-height: 92vh;
        }

        .modal-header,
        .modal-body,
        .modal-footer,
        .map-modal-footer {
            padding-left: 1rem;
            padding-right: 1rem;
        }

        .modal-title {
            font-size: 1.02rem;
        }
    }


/* ============================================================
 * Page "Comment ça marche ?" – présentation type modale
 * Barre supérieure sticky avec titre + bouton de fermeture (×)
 * qui ramène à index.html. Sur mobile, le conteneur prend
 * toute la largeur pour ressembler à une feuille modale.
 * ============================================================ */
body.help-page {
    background: #f4f6f9;
    margin: 0;
}
.help-page-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 1.5rem auto;
    padding: 0 0.55rem 1rem;
    position: relative;
}

/* Version plus compacte pour la page aide: moins de marges,
   d'espaces verticaux et d'interlignes. */
body.help-page .help-page-container {
    line-height: 1.45;
}

body.help-page .help-page-container h2 {
    margin-top: 1.1rem;
    margin-bottom: 0.45rem;
    padding-left: 0.45rem;
}

body.help-page .help-page-container h2.help-step-title {
    border-left: 0;
    padding-left: 0;
}

body.help-page .help-page-container h3 {
    margin-top: 0.8rem;
    margin-bottom: 0.35rem;
}

body.help-page .help-page-container p,
body.help-page .help-page-container ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.help-participant-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 0.8rem 0 1rem;
}

body.help-page .help-page-container ul {
    padding-left: 1rem;
}

@media (max-width: 768px) {
    #conversation-modal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        height: 100dvh !important;
        margin: 0 !important;
    }
}

body.help-page .help-page-container li {
    margin: 0.35rem 0;
}

body.help-page .help-page-container .anonymous-info,
body.help-page .help-page-container .anonymous-features,
body.help-page .help-page-container .contact-info,
body.help-page .help-page-container .action-box,
body.help-page .help-page-container .warning {
    padding: 0.75rem;
    margin: 0.7rem 0;
}

body.help-page .help-page-container .anonymous-info h4,
body.help-page .help-page-container .anonymous-features h4 {
    margin: 0 0 0.45rem 0;
}
.help-page-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 -1.25rem 1rem;
    padding: .75rem 1.25rem;
    background: #a65902;
    color: #ffffff;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.help-page-bar-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.help-page-bar-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    text-decoration: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    flex: 0 0 auto;
    transition: background-color .15s ease, transform .15s ease;
}
.help-page-bar-close:hover,
.help-page-bar-close:focus {
    background: rgba(255, 255, 255, 0.30);
    color: #ffffff;
    outline: none;
    transform: scale(1.05);
}
/* Le H1 d'origine devient redondant avec le titre de barre :
   on le masque pour ne garder qu'un seul titre principal. */
.help-page-h1 {
    display: none;
}
@media (max-width: 768px) {
    body.help-page {
        background: #ffffff;
    }
    .help-page-container {
        margin: 0 auto;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        padding: 0 0.45rem 0.9rem;
        max-width: 100%;
    }
    .help-page-bar {
        margin: 0 -1rem 1rem;
        border-radius: 0;
    }
}

