/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --page-bottom-space: 80px;

    --start-button-height: 80px;
    --start-button-padding: 20px;
    --character-gap: 0px;
    --character-overlap: 28%;
    --primary: #c946a6;
    --primary-dark: #8b5fbf;
    --blue: #1e90ff;
    --purple: #8424f4;
    --pink: #ba6aa7;
    --violet: #af80f2;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --border: #ddd;
    --background: #f5f5f5;
    --white: #fff;
    --plan-header-height: 80px;
    --plan-legend-height: 3500px;
    --bottom-menu-height: 70px;
    --home-menu-gap: 5px;
    --pagination-menu-gap: 10px;
    --chat-input-height: 62px;
    --pagination-height: 58px;
    --chat-bottom-space:
        calc(
            var(--chat-input-height) +
            var(--pagination-menu-gap) +
            var(--pagination-height) +
            var(--pagination-menu-gap) +
            var(--bottom-menu-height)
        );
    --home-bottom-space:
        calc(
            var(--bottom-menu-height) +
            var(--home-menu-gap)
        );
    --plan-bottom-space:
        calc(
            var(--bottom-menu-height) +
            var(--home-menu-gap)
        );
}


/* =========================================================
   RESET / GLOBAL
   ========================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}

html {
    min-width: 0;
}

body {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: var(--text);
    background: var(--background);

    overflow: hidden;

    -webkit-overflow-scrolling: touch;
}

button,
input,
select,
textarea {
    font-family: inherit;
}
button {
    cursor: pointer;
}
img {
    max-width: 100%;
}
a {
    color: inherit;
}
.hidden {
    display: none !important;
}

/* =========================================================
   HEADER
   ========================================================= */

.gradient-header {
    position: relative;
    width: 100%;
    min-width: 0;
    height: var(--plan-header-height);
    min-height: var(--plan-header-height);
    flex: 0 0 var(--plan-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding:
        10px
        clamp(10px, 3vw, 20px);

    color: #fff;
    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 50%,
            #1e90ff 100%
        );

    overflow: hidden;
    z-index: 100;
}

.gradient-header small {
    display: block;
    max-width: 100%;
    font-size: clamp(8px, 1.8vw, 12px);
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.header-title {
    position: absolute;
    top: 50%;
    left: 49%;
    transform: translate(-50%, -50%);

    /*
     * On réserve de la place pour :
     * - le bouton retour à gauche
     * - le menu à droite
     */
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #fff;
    text-align: center;

    overflow: hidden;
    word-break: break-word;
    z-index: 1;
}

.header-title-main,
.header-title-subtitle {
    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    text-align: center;

    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.header-title-main {
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 600;
    line-height: 1.15;
}

.header-title-subtitle {
    margin-top: 4px;

    font-size: clamp(11px, 2vw, 16px);
    font-weight: 600;
    
    white-space: normal;
}
.header-back,
.header-menu {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 24px;
}

.header-back {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
}

.header-menu {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex: 0 0 auto;
    min-width: 64px;
    max-width: 80px;
}

.header-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.header-menu img {
    display: block;

    width: clamp(24px, 6vw, 30px);
    height: clamp(24px, 6vw, 30px);
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}

.header-menu-item {
    width: clamp(27px, 7vw, 38px);
    height: clamp(30px, 7vw, 38px);

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    text-decoration: none;
}

.header-menu-item i {
    color: #fff;
    font-size: clamp(22px, 5vw, 28px);
    line-height: 1;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.header-menu-item:hover i {
    transform: scale(1.08);
    opacity: 0.9;
}
.container,
.content {
    min-height: 0;
}
/* =========================================================
   CONTAINER GLOBAL
   ========================================================= */
.container {
    width: 100%;
    min-width: 0;
    height:
        calc(
            100dvh -
            var(--plan-header-height)
        );
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* =========================================================
   CONTENT
  ========================================================= */
.content {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease-in;
    padding: 0 5px 0 5px;
}
/* =========================================================
   INFO SECTION
   ========================================================= */
.info-section {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
    padding: 12px 15px;
    color: var(--text-light);
    background: #f9f9f9;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
 ERROR SECTION
   ========================================================= */
.error {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
    padding: 12px 15px;
    color: var(--text-light);
    background: #fa0101;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* =========================================================
 SUCESS SECTION
   ========================================================= */
.success {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
    padding: 12px 15px;
    color: var(--text-light);
    background:#22b453;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.no-messages{
    flex: 0 0 auto;
     
}
/* =========================================================
   PLAN
  ========================================================= */

.plan-page {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-container {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.map {
    width: 100%;
    height: 100%;
}

.legend_map {
    width: 100%;
    flex: 0 0 auto;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding:1.1rem
        1.25rem;
}

.legend_map img {
    display: block;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: clamp(
        60px,
        20dvh,
        120px
    );
    object-fit: contain;

}


/* =========================================================
   BOTTOM MENU
   ========================================================= */
.bottom-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 0;
    height: var(--bottom-menu-height);
    min-height: var(--bottom-menu-height);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin: 0;
    padding:
        0
        env(safe-area-inset-right, 0px)
        env(safe-area-inset-bottom, 0px)
        env(safe-area-inset-left, 0px);
    background: #fff;
    border-top: 1px solid #eee;
    overflow: hidden;
}

.menu-item {
    width: clamp(60px, 18vw, 100px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, 1vw, 5px);
    padding: clamp(4px, 2vw, 10px);
    color: #474747;
    font-size: clamp(9px, 2.8vw, 14px);
    text-decoration: none;
    transition: color 0.2s ease;
}
.menu-item:hover,
.menu-item.active {
    color: var(--purple);
}

.menu-item-icon {
    position: relative;
    width: clamp(28px, 8vw, 40px);
    height: clamp(28px, 8vw, 40px);
    flex: 0 0 auto;
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.menu-item-icon img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    object-fit: contain;
    pointer-events: none;
}
.menu-item-icon .default_icon {
    z-index: 1;
    display: block;
}
.menu-item-icon .hover_icon {
    z-index: 2;
    display: none;
}
.menu-item.active .default_icon,
.menu-item:hover .default_icon {
    display: none;
}
.menu-item.active .hover_icon,
.menu-item:hover .hover_icon {
    display: block;
}
/* =========================================================
   CHAT — STRUCTURE PRINCIPALE
   ========================================================= */
.echanges-container {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    overflow: hidden;
}

/* =========================================================
   CHAT HEADER
   ========================================================= */

.chat-header {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    padding: 20px;
    color: #fff;
    background:
        linear-gradient(
            90deg,
            #d94b9e 0%,
            #8b5fbf 100%
        );
    text-align: center;
    
}
.chat-header h2 {
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.chat-header p {
    font-size: 12px;

    opacity: 0.9;

    overflow-wrap: anywhere;
    word-break: break-word;
}
/* =========================================================
   CHAT MESSAGES
   ========================================================= */
.chat-messages {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 1;
    background-image:  url("../img/Fonds_livredor/Fond-Chat-message-blanc.png");
}


.admin-text {
    font-weight: bold;
    font-style: italic;
}
/* =========================================================
   GROUPES MESSAGES
   ========================================================= */



.message-group {
    width: 50%;             
    max-width: 50%;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;

    margin-bottom: 4px;
}

/* Messages reçus à gauche */
.message-group.received {
     align-self: flex-start;
    align-items: flex-start;
    margin-right: 0;
}
/* Messages envoyés à droite */
.message-group.sent {
    align-self: flex-end;
    align-items: flex-end;
    margin-left: 0;
}

/* Reçu → informations à gauche */
.message-group.received .message-time {
    text-align: left;
}

/* Envoyé → informations à droite */
.message-group.sent .message-time {
    text-align: right;
}

.message {
    display: flex;
    width: 100%;
    min-width: 0;
}

/* Bulle */
.message-bubble { 
    width: 100%; 
    box-sizing: border-box; 

    min-height: clamp(30px, 8vw, 60px); 
    padding: 3px 14px 6px; 

    display: flex;
    align-items: center;
    font-size: clamp(18px, 3vw, 30px); 
    line-height: 1; 
    font-family: "Microsoft Himalaya";
    color: var(--text); 
    background-color: white; 

    word-break: break-word; 
    overflow-wrap: anywhere; 
    white-space: unset; 

    border-radius: 18px; 
    box-shadow: 0 5px 2px rgba(0, 0, 0, 0.1); 
}
.message-bubble > * {
    margin: 0;}
/* Angle des bulles */
.message-group.received .message-bubble {
    border-top-left-radius: 4px;
}

.message-group.sent .message-bubble {
    border-top-right-radius: 4px;
}


/* =========================================================
   DATE / INFORMATIONS SOUS LA BULLE
   ========================================================= */

.message-time {
    display: block;

    /* FORCE la date sous la bubble */
    width: 100%;

    margin-top: 4px;

    text-align: right;

    color: rgba(0, 0, 0, 0.45);

    font-size: clamp(8px, 1.8vw, 11px);
    line-height: 1.2;

    overflow-wrap: anywhere;
    word-break: break-word;
}
/* =========================================================
   ZONE DE SAISIE CHAT
   ========================================================= */
.chat-input-area,
.pagination-container {
    flex: 0 0 auto;
}
.chat-input-area {
    position: relative;
    width: 100%;
    flex: 0 0 var(--chat-input-height); /* Hauteur fixe */
    margin: 0;
    padding: 10px 15px;
    background: #fafafa;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    z-index: 20;
}

/* =========================================================
   CHAT FORM
   ========================================================= */
.chat-form {
    width: 100%;
    height: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 0;
}
.chat-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 40px;
    padding:
        10px
        16px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: white;
    color: var(--text);
    font-size: 14px;
    resize: none;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 2px rgba(
            201,
            70,
            166,
            0.15
        );
}
.chat-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #ba6aa7 0%,
            #af80f2 100%
        );
}
/* =========================================================
   PAGINATION
   ========================================================= */
.pagination-container {
    position: relative;
    width: 100%;
    flex: 0 0 var(--pagination-height); /* Hauteur fixe */
    margin: 0;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 20;
}
.pagination-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: #555;
    background: #fff;
    font-size: 14px;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.pagination-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.pagination-btn.active {
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #d94b9e 0%,
            #8b5fbf 100%
        );

    border-color: #d94b9e;
}
/* =========================================================
   SECURITE CHAT
   ========================================================= */

.chat-messages::after {
    content: "";
    display: block;
    width: 100%;
    height: 20px;
    min-height: 20px;
    flex: 0 0 20px;
    pointer-events: none;
}

/* =========================================================
   BOUTONS
   ========================================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 100%
        );
    font-size: 16px;
    font-weight: 600;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow:
        0 8px 20px rgba(
            139,
            95,
            191,
            0.25
        );
}

.btn-validate {
    width: 100%;

    margin-top: 20px;

    padding: 14px 30px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    border: none;

    border-radius: 8px;

    color: #fff;

    background: var(--primary);

    font-size: 14px;
    font-weight: 600;

    box-sizing: border-box;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.btn-validate:hover {
    opacity: 0.9;

    transform: translateY(-1px);
}
/* =========================================================
   HERO
   ========================================================= */
.hero-section {
    margin-top: 40px;
    text-align: center;
}

.hero-section h1 {
    margin-bottom: 20px;

    color: var(--text);

    font-size: 32px;
    font-weight: 700;

    line-height: 1.3;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-section p {
    margin-bottom: 30px;

    color: var(--text-light);

    font-size: 14px;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-section img {
    height: auto;
    max-width: 100%;

    margin-bottom: 30px;
}


/* =========================================================
   FORMULAIRES
   ========================================================= */

.form-group {
    margin-bottom: 20px;
    min-width: 0;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.form-group input,
.form-group select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(
            201,
            70,
            166,
            0.1
        );
}
.legend {
    color: var(--primary);

    font-size: 14px;
    font-weight: bold;

    text-align: center;
}

/* =========================================================
   CHECKBOX
   ========================================================= */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: var(--purple);
    cursor: pointer;
}

label:has(input[type="checkbox"]) {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* =========================================================
   ADMIN
   ========================================================= */
.cp-inline {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 8px;
    margin-bottom:5px;
    min-width: 0;
}

.cp-inline input,
.cp-inline .cp-input,
.cp-inline .cp-input-md {
    flex: 1 1 auto;

    min-width: 0;
    max-width: 100%;
}
.cp-btn-eye {

    flex: 0 0 44px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: #f5f5f5;

    color: var(--text);

    font-size: 18px;
}

.cp-btn-eye:hover {
    background: #eee;

    border-color: var(--primary);
}

.admin-settings {
    width: 100%;
    min-width: 0;

    margin-bottom: 25px;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.settings-grid {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 320px),
                1fr
            )
        );

    gap: 20px;
}

.settings-card,
.admin-section {
    width: 100%;

    min-width: 0;
    max-width: 100%;

    padding: 22px;

    background: #fff;

    border-radius: 14px;
    overflow-y: auto;
    overflow-x:hidden;
    box-shadow:
        0 4px 16px rgba(
            0,
            0,
            0,
            0.05
        );

    overflow: hidden;
}

.admin-section {
    margin-bottom: 20px;
}

.configuration,
.admin_Export {
    margin-top: 20px;
    margin-bottom: 20px;
}

.admin-section + .admin-section {
    margin-top: 20px;
}


/* =========================================================
   HEADERS SECTIONS
   ========================================================= */

.settings-card-title,
.section-header {
    width: 100%;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 22px;

    max-width: 100%;
}

.settings-card-icon,
.section-header-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 55%,
            #1e90ff 100%
        );

    font-size: 20px;
}

.settings-card-heading,
.section-header-content {
    flex: 1 1 auto;

    min-width: 0;
    max-width: 100%;
}

.settings-card-title h2,
.settings-card-title h3,
.section-header h2 {
    margin: 0 0 3px;

    color: var(--text);

    font-size: 17px;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.settings-card-title p,
.section-header p {
    margin: 0;

    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   SETTINGS FORM
   ========================================================= */

.settings-form {
    width: 100%;

    min-width: 0;
    max-width: 100%;

    display: flex;

    flex-direction: column;
}

.settings-form .form-group {
    width: 100%;

    min-width: 0;
    max-width: 100%;

    margin-bottom: 18px;
}

.settings-form label {
    display: block;

    max-width: 100%;

    margin-bottom: 7px;

    color: var(--text);

    font-size: 13px;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.settings-form input,
.settings-form select {
    width: 100%;

    min-width: 0;
    max-width: 100%;

    padding: 12px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: #fff;

    font-size: 14px;
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(
            201,
            70,
            166,
            0.1
        );
}

/* =========================================================
   HORAIRES
   ========================================================= */

.hours-row {
    width: 100%;

    min-width: 0;

    display: flex;

    align-items: flex-end;

    gap: 10px;
}

.hours-field {
    flex: 1 1 0;

    min-width: 0;
    max-width: 100%;
}

.hours-label {
    display: block;

    margin-bottom: 6px;

    color: var(--text-muted);

    font-size: 11px;
}

.hours-field input {
    width: 100%;

    min-width: 0;
    max-width: 100%;
}

.hours-separator {
    flex: 0 0 auto;

    padding-bottom: 12px;

    color: var(--text-muted);
}
.Parametres {
    flex: 1 1 auto; 
    min-height: 0;
    overflow-y: auto;
     overflow-x:auto;
}

/* =========================================================
   BADGES
   ========================================================= */

.badges-section {
    width: 100%;

    min-width: 0;
}

.badges-info {
    width: 100%;

    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 220px),
                1fr
            )
        );

    gap: 12px;

    margin-bottom: 20px;
}

.badges-info-item {
    min-width: 0;

    max-width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 14px 16px;

    background: #f8f8f8;

    border-radius: 9px;
}

.badges-info-item span {
    min-width: 0;

    color: var(--text-light);

    font-size: 13px;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.badges-info-item strong {
    flex: 0 0 auto;

    color: var(--primary);

    font-size: 17px;
}

.actions-fonction,
#form-badges,
.badges-form {
    width: 100%;

    min-width: 0;
}

.badges-actions {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        clamp(110px, 12vw, 150px)
        minmax(0, 1fr);

    gap: clamp(6px, 1vw, 10px);

    align-items: end;
}

.badges-number {
    width: 100%;
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 6px;
}

.badges-number label {
    display: block;

    color: var(--text-light);

    font-size: 12px;

    line-height: 1.3;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.badges-buttons {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                clamp(100px, 12vw, 180px),
                1fr
            )
        );

    gap: clamp(6px, 1vw, 10px);
}

.badges-number input {
    width: 100%;

    min-width: 0;

    height: 44px;

    padding: 10px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: #fff;

    color: var(--text);

    font-size: 14px;

    box-sizing: border-box;
}

.badges-number input:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(
            201,
            70,
            166,
            0.1
        );
}

.btn-fonction {
    width: 100%;
    min-width: 0;

    height: clamp(36px, 4vw, 44px);

    color: #fff;

    padding:
        clamp(5px, 0.8vw, 8px)
        clamp(6px, 1vw, 12px);

    font-size: clamp(10px, 1vw, 14px);

    border: none;

    border-radius: clamp(5px, 0.7vw, 8px);

    background-color: var(--primary);

    box-sizing: border-box;

    white-space: normal;

    overflow-wrap: anywhere;
    word-break: break-word;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.btn-fonction:hover {
    opacity: 0.95;

    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(
            139,
            95,
            191,
            0.25
        );
}

.btn-fonction:active {
    transform: translateY(0);
}

.btn-fonction.btn-danger {
    background: #d94b4b;
}

.btn-fonction.btn-danger:hover {
    background: #c93636;

    opacity: 1;
}

.hidden-form {
    display: none !important;
}


/* =========================================================
   EXPORTS
   ========================================================= */

.export-section {
    width: 100%;

    min-width: 0;

    margin-bottom: 0;
}

.export-list {
    width: 100%;

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 12px;
}

.export-card {
    width: 100%;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 16px;

    background: #fafafa;

    border: 1px solid #eee;

    border-radius: 10px;

    overflow: hidden;
}

.export-card-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6,
            #8b5fbf
        );

    font-size: 20px;
}

.export-card-content {
    flex: 1 1 auto;

    min-width: 0;
    max-width: 100%;
}

.export-card-content h3 {
    margin-bottom: 3px;

    color: var(--text);

    font-size: 14px;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.export-card-content p {
    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.export-form {
    flex: 0 1 auto;

    min-width: 0;
    max-width: 100%;
}

.btn-export {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    max-width: 100%;
    min-width: 0;

    min-height: 40px;

    padding: 8px 18px;

    border: none;

    border-radius: 20px;

    color: #fff;

    background-color: var(--primary);

    font-size: clamp(10px, 2vw, 14px);
    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    box-sizing: border-box;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.btn-export:hover {
    opacity: 0.95;

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(
            139,
            95,
            191,
            0.25
        );
}

.settings-submit {
    width: 100%;

    min-width: 0;

    margin-top: 0;
}
/* =========================================================
   QUESTIONNAIRE
   ========================================================= */
.Reponse {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    padding:
        5px
        8px
        calc(
            var(--pagination-height) +
            var(--pagination-menu-gap) +
            var(--bottom-menu-height) +
            25px
        )
        5px;

    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color:
        #b8b8c5
        transparent;
}


.questionnaire {
    padding: 0;
    background: #fff;
    border-radius: 0;
}

.question-text {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.radio-fieldset {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 5px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #f9f9f9;
}

.radio-legend {
    margin-bottom: 5px;
    padding: 0 10px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.radio-fieldset .radio-option {
    margin: 5px 0;
    padding: 10px;
    border-radius: 4px;
}

.radio-fieldset .radio-option:hover {
    background: #f0f0f0;
}

.radio-fieldset .radio-option input[type="radio"] {
    margin-right: 12px;
    accent-color: #007bff;
}

.radio-fieldset .radio-option span {
    color: #555;
    font-size: 12px;
    user-select: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.radio-fieldset
.radio-option
input[type="radio"]:checked
+ span {
    color: #007bff;
    font-weight: 600;
}

.textarea-optional {
    width: 100%;
    min-height: 60px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    resize: vertical;
}

/*  PROGRESSION
   ========================================================= */
.progress-bar {
    position: relative;
    width: 100%;
    height: var(--pagination-height);
    min-height: var(--pagination-height);
    flex: 0 0 auto;
    margin: 0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: white;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    z-index: 20;
}

.progress-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ddd;
}

.progress-dot.active {
    width: 12px;
    background:
        linear-gradient(
            135deg,
            #c946a6,
            #8b5fbf
        );
}
/* =========================================================
   HOME
   ========================================================= */
.home-container {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    padding-bottom:
        calc(
            var(--bottom-menu-height) +
            var(--home-menu-gap)
        );
    color: #fff;
    background:
        linear-gradient(
            120deg,
            #800064 0%,
            #ba6aa7 35%,
            #af80f2 70%,
            #264fc4 100%
        );
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.home-container::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        url("../img/background_esti.svg");

    background-repeat: repeat;
    background-size: 340px 150px;
    opacity: 0.15;
    pointer-events: none;
}

.home-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(0, 0, 0, 0.08) 100%
        );
    pointer-events: none;
}

.home-logos {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    color: #fff;
    min-width: 0;
}

.home-logos .logo {
    padding-left: 15px;
    border-left: 2px solid #fff;
    font-size: 16px;
    font-weight: bold;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.home-content {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding:
        0
        20px;
    text-align: left;
    overflow: hidden;
}

.home-content h1 {
    margin-bottom: 10px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.home-content p {
    margin-bottom: 20px;
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* =========================================================
   PERSONNAGE HOME
   ========================================================= */
.character-area {
    position: absolute;
    right:
        clamp(
            10px,
            4vw,
            70px
        );
    bottom:
        calc(
            var(--bottom-menu-height) +
            var(--home-menu-gap) +
            var(--start-button-height)
        );
    width:
        clamp(
            180px,
            43vw,
            600px
        );
    max-width: 55vw;
    height: auto;
    z-index: 4;
    overflow: visible;
    pointer-events: none;
    
}

.character-img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    object-fit: contain;
    object-position: center bottom;
}

.edition-badge {
    position: absolute;
    top: 48%;
    right: 6%;
    z-index: 5;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}


/* =========================================================
   HOME BUTTON
   ========================================================= */

.home-button-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom:
        calc(
            var(--bottom-menu-height) +
            var(--home-menu-gap)
        );

    width: 100%;

    min-width: 0;

    z-index: 10;

    padding:
        0
        var(--start-button-padding);
}

.btn-start {
    position: relative;

    z-index: 2;

    width: 100%;

    height: var(--start-button-height);

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    padding:
        1.1rem
        1.25rem;

    border: none;

    border-radius: 28px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #ba6aa7 0%,
            #af80f2 100%
        );

    box-shadow:
        0 14px 30px rgba(
            128,
            0,
            100,
            0.28
        );

    font-size: 1rem;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    min-width: 0;
}

.btn-start:hover {
    transform: scale(1.02);

    background:
        linear-gradient(
            135deg,
            #9024fa 0%,
            #ba6aa7 100%
        );

    box-shadow:
        0 18px 35px rgba(
            128,
            0,
            100,
            0.35
        );
}

.btn-start:active {
    transform: scale(0.99);
}

.btn-start-icon,
.btn-start-arrow {
    width: 45px;
    height: 45px;

    flex: 0 0 45px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 20px;
}

.btn-start-icon {
    color: #fff;

    background:
        rgba(
            255,
            255,
            255,
            0.18
        );
}

.btn-start-arrow {
    color: var(--primary);

    background: #fff;
}


/* =========================================================
   INFO BOX PLAN
   ========================================================= */

#info-box {
    position: fixed;

    top: 70px;
    right: 20px;

    width: 300px;

    max-width:
        calc(
            100% - 40px
        );

    z-index: 1500;

    background: #fff;

    border-radius: 10px;

    box-shadow:
        0 6px 20px rgba(
            0,
            0,
            0,
            0.15
        );

    overflow: hidden;
}

#drawer-handle,
#btn-close-drawer {
    display: none;
}

#info-color-bar {
    height: 6px;

    background: #ccc;
}

#info-content {
    padding: 18px;

    min-width: 0;
}

#info-label {
    display: inline-block;

    margin-bottom: 8px;

    padding: 2px 8px;

    color: #fff;

    background: #003189;

    border-radius: 4px;

    font-size: 0.72rem;

    font-weight: bold;

    text-transform: uppercase;
}

#info-label:empty {
    display: none;
}

#info-title {
    margin-bottom: 8px;

    color: #003189;

    font-size: 0.95rem;

    font-weight: bold;

    line-height: 1.3;

    overflow-wrap: anywhere;
    word-break: break-word;
}

#info-description {
    color: #555;

    font-size: 0.88rem;

    line-height: 1.6;

    overflow-wrap: anywhere;
    word-break: break-word;
}

#info-duree {
    display: inline-block;

    margin-top: 12px;

    padding: 5px 10px;

    color: #6a1be2;

    background: #f3eeff;

    border-radius: 4px;

    font-size: 0.82rem;

    font-weight: bold;
}


/* =========================================================
   OVERLAY
   ========================================================= */

#overlay {
    display: none;

    position: fixed;

    inset: 0;

    z-index: 1400;

    background:
        rgba(
            0,
            0,
            0,
            0.4
        );
}

#overlay.active {
    display: block;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-page {
    
    display: block;
    flex-direction: column;
    padding: 0;
    min-width: 0;
    min-height: 0;
    height: 100%;
    color: var(--text);
    flex: 1 1 auto; 
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    overflow: auto;
}

.contact-hero {
    margin-bottom: 20px;
    min-height: 0;
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 22px;

    background: #fff;

    border-radius: 14px;

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.05);

    overflow: hidden;
}

.contact-hero-icon {
    width: 52px;
    height: 52px;

    flex: 0 0 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 55%,
            #1e90ff 100%
        );

    font-size: 25px;

    box-shadow:
        0 5px 14px rgba(
            139,
            95,
            191,
            0.20
        );
}

.contact-hero > div:last-child {
    flex: 1 1 auto;

    min-width: 0;
}

.contact-hero h1 {
    margin: 0 0 5px;

    color: var(--text);

    font-size: 20px;
    font-weight: 700;

    line-height: 1.3;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-hero p {
    margin: 0;

    color: var(--text-muted);

    font-size: 13px;

    line-height: 1.5;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-grid {
    
    margin-bottom: 20px;
    min-width: 0;
    max-width: 100%;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 300px),
                1fr
            )
        );

    gap: 20px;
}

.contact-card {
    
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 4px 16px rgba(
            0,
            0,
            0,
            0.05
        );
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 22px rgba(
            0,
            0,
            0,
            0.08
        );
}

.contact-card-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 100%
        );
    font-size: 21px;
}

.salon-icon {
    background:
        linear-gradient(
            135deg,
            #c946a6,
            #8b5fbf
        );
}

.informatique-icon {
    background:
        linear-gradient(
            135deg,
            #8b5fbf,
            #1e90ff
        );
}

.contact-card-content {
    flex: 1 1 auto;

    min-width: 0;
    max-width: 100%;
}

.contact-card-content h2 {
    margin: 0 0 7px;

    color: var(--text);

    font-size: 16px;
    font-weight: 700;

    line-height: 1.3;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-card-content p {
    margin: 0 0 14px;

    color: var(--text-light);

    font-size: 13px;

    line-height: 1.55;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-card-content strong {
    color: var(--primary);
}

.contact-card-info {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 10px 12px;

    background: #f8f8f8;

    border-radius: 8px;

    color: var(--text-light);

    font-size: 12px;
}

.contact-card-info span {
    flex: 0 0 auto;

    font-size: 16px;
}

.contact-card-info strong {
    min-width: 0;

    color: var(--text-light);

    font-size: 12px;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   RESPONSABLES
   ========================================================= */

.responsables-section {
    
    margin-bottom: 20px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 4px 16px rgba(
            0,
            0,
            0,
            0.05
        );

    overflow: hidden;
}

.section-title {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}

.section-title-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 55%,
            #1e90ff 100%
        );

    font-size: 20px;
}

.section-title > div {
    flex: 1 1 auto;

    min-width: 0;
}

.section-title h2 {
    margin: 0 0 3px;

    color: var(--text);

    font-size: 17px;
    font-weight: 700;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.section-title p {
    margin: 0;

    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.responsables-grid {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 280px),
                1fr
            )
        );

    gap: 15px;
}

.responsable-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 17px;

    background: #f8f8f8;

    border: 1px solid #eee;

    border-radius: 11px;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.responsable-card:hover {
    background: #fff;

    border-color: #e3d5ed;

    transform: translateY(-1px);
}

.responsable-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6,
            #8b5fbf
        );

    font-size: 20px;
}

.responsable-icon.lieu-icon {
    background:
        linear-gradient(
            135deg,
            #8b5fbf,
            #1e90ff
        );
}

.responsable-content {
    flex: 1 1 auto;

    min-width: 0;
    max-width: 100%;
}

.responsable-label {
    display: block;

    margin-bottom: 4px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 500;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.responsable-content h3 {
    margin: 0 0 7px;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;

    line-height: 1.35;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.responsable-phone {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    color: var(--primary);

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    overflow-wrap: anywhere;
}

.responsable-phone:hover {
    color: var(--purple);

    text-decoration: underline;
}

.responsable-pending {
    margin: 0;

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.4;
}


/* =========================================================
   URGENCES
   ========================================================= */

.emergency-section {
    
    margin-bottom: 20px;
    min-width: 0;
    padding: 22px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eee;
    box-shadow:
        0 4px 16px rgba(
            0,
            0,
            0,
            0.05
        );
    overflow: hidden;
}

.emergency-header {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 18px;
}

.emergency-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6 0%,
            #8b5fbf 55%,
            #1e90ff 100%
        );

    font-size: 21px;

    box-shadow:
        0 5px 14px rgba(
            139,
            95,
            191,
            0.20
        );
}

.emergency-header > div:last-child {
    flex: 1 1 auto;

    min-width: 0;
}

.emergency-header h2 {
    margin: 0 0 3px;

    color: var(--text);

    font-size: 17px;
    font-weight: 700;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.emergency-header p {
    margin: 0;

    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.emergency-numbers {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 180px),
                1fr
            )
        );

    gap: 10px;
}

.emergency-number {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px;

    color: var(--text);

    background: #f8f8f8;

    border: 1px solid #eee;

    border-radius: 10px;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.emergency-number:hover {
    transform: translateY(-2px);

    background: #fff;

    border-color: #d8c5e8;

    box-shadow:
        0 5px 14px rgba(
            139,
            95,
            191,
            0.12
        );
}

.emergency-number-icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6,
            #8b5fbf
        );

    font-size: 19px;
}

.emergency-number-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.emergency-number-content strong {
    color: var(--primary);

    font-size: 19px;
    font-weight: 800;

    line-height: 1;
}

.emergency-number-content small {
    color: var(--text-light);

    font-size: 10px;

    line-height: 1.3;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   QUESTIONS
   ========================================================= */

.question-block {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}

.question-section {
    width: 100%;
    min-width: 0;

    margin: 0 0 18px;
    padding: 18px;

    background: #fff;

    border: 1px solid #eee;
    border-radius: 14px;

    box-shadow:
        0 3px 12px rgba(
            0,
            0,
            0,
            0.05
        );
}

.question-link {
    display: block;

    color: #8b5fbf;

    text-decoration: none !important;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.question-link,
.question-link .question-title,
.question-link .question-label {
    color: #8b5fbf !important;

    text-decoration: none !important;
}

.question-link:visited,
.question-link:hover,
.question-link:active {
    color: #8b5fbf !important;

    text-decoration: none !important;
}

.question-link:hover {
    transform: translateX(4px);
}

.question-header {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 15px;

    min-width: 0;
}

.question-number-Emoji {
    font-family:
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Noto Color Emoji",
        sans-serif;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 5px;

    flex-shrink: 0;

    line-height: 1;

    font-size: 1.8rem;

    border-radius: 50%;
}

.question-number {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    flex-shrink: 0;

    border-radius: 50%;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #c946a6,
            #8b5fbf
        );

    font-size: 12px;
    font-weight: 600;
}

.question-title {
    flex: 1;

    min-width: 0;
}

.question-label {
    color: var(--text);

    font-size: 15px;
    font-weight: 600;

    line-height: 1.45;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.question-required {
    margin-left: 3px;

    color: #d32f2f;

    font-size: 17px;
    font-weight: 700;
}

.radio-group {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.radio-option {
    width: 100%;
    min-width: 0;

    display: flex;

    align-items: center;

    gap: 10px;

    margin: 0;
    padding: 11px 13px;

    border: 1px solid #e8e8e8;

    border-radius: 9px;

    background: #fafafa;

    color: #555;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.radio-option:hover {
    background: #f7f2fa;

    border-color: var(--primary);

    transform: translateX(2px);
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
    width: 19px;
    height: 19px;

    flex: 0 0 19px;

    margin: 0;

    cursor: pointer;

    accent-color: var(--primary);
}

.radio-option span {
    flex: 1;

    min-width: 0;

    color: #555;

    font-size: 13px;

    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.radio-option.answer-correct {
    background: #e8f7ed;

    border: 2px solid #16803a;

    color: #16803a;
}

.radio-option.answer-correct span {
    color: #16803a;

    font-weight: 700;
}

.radio-option.answer-wrong {
    background: #fdeaea;

    border: 2px solid #c62828;

    color: #c62828;
}

.radio-option.answer-wrong span {
    color: #c62828;
}

.answer-status {
    flex: 0 0 auto;

    padding: 5px 12px;

    border-radius: 20px;

    white-space: nowrap;

    font-size: 12px;
    font-weight: 700;
}

.answer-status-correct {
    color: #16803a;

    background: #d8f3e1;
}

.answer-status-wrong {
    color: #c62828;

    background: #f9d7d7;
}

.question-textarea {
    width: 100%;

    min-height: 110px;

    margin-top: 5px;

    padding: 12px;

    border: 1px solid var(--border);

    border-radius: 9px;

    color: var(--text);

    background: #fff;

    font-family: inherit;

    font-size: 13px;

    line-height: 1.5;

    resize: vertical;
}

.question-textarea:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(
            201,
            70,
            166,
            0.12
        );
}

.no-answer {
    padding: 10px 0;

    color: #777;

    font-size: 13px;
}
/* =========================================================
   LOGO
   ========================================================= */

.logo-sncf {
    width: auto;

    height: 180px;

    object-fit: contain;
}
/* =========================================================
   SECURITE GENERALE DES CONTENEURS
   ========================================================= */

.admin-section,.settings-card,.export-card,.badges-section,.settings-grid,.settings-form,.section-header,
.settings-card-title,.badges-actions,.badges-info,.chat-messages,.chat-form,.chat-input-area,.pagination-container,.echanges-container,.contact-page,.contact-hero,
.contact-grid,.contact-card,.contact-card-content,.responsables-section,.responsables-grid,.responsable-card,.responsable-content,.emergency-section,.emergency-header,
.emergency-numbers,.emergency-number,.emergency-number-content {
    min-width: 0;

    max-width: 100%;
}

.admin-section h1,.admin-section h2,.admin-section h3,.admin-section h4,.admin-section p,.admin-section span,
.settings-card h1,.settings-card h2,.settings-card h3,.settings-card h4,.settings-card p,.settings-card span,.export-card h1,
.export-card h2,.export-card h3,.export-card h4,.export-card p,.export-card span,

.contact-page h1,.contact-page h2,
.contact-page h3,.contact-page p,
.contact-page span,.contact-page strong,
.contact-page small {
    max-width: 100%;

    overflow-wrap: anywhere;

    word-break: break-word;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

.contact-card,.responsable-card,
.emergency-number {
    -webkit-tap-highlight-color: transparent;
}

.contact-card:active,
.responsable-card:active,
.emergency-number:active {
    transform: scale(0.99);
}
/* =========================================================
   CORRECTION FINALE — SCROLL LIMITÉ À L'ESPACE LIBRE
   À PLACER TOUT À LA FIN DU FICHIER
   ========================================================= */

/* La page ne défile jamais globalement */
html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Header : hauteur fixe, toujours visible */
.gradient-header {
    position: relative;
    flex: 0 0 var(--plan-header-height);
    z-index: 100;
}

/* Zone disponible entre header et menu bas */
.container {
    position: relative;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* .content ne défile pas : il délègue à ses enfants */
.content {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
   
}

/* Menu bas : hauteur fixe, dans le flux (pas de recouvrement) */
.bottom-menu {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    flex: 0 0 var(--bottom-menu-height);
    z-index: 100;
}

/* =========================================================
   PARAMÈTRES — défile dans l'espace libre
   ========================================================= */
.Parametres {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;         /* espace libre uniquement */
    padding: 5px 8px 20px 5px;   /* plus de padding géant */
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

}

/* Pas de scroll imbriqué dans les cartes */
.settings-card,
.admin-section {
    overflow: visible;
}

/* =========================================================
   QUESTIONNAIRE — .Reponse défile, .progress-bar reste visible
   ========================================================= */
.content:has(.Reponse) {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.ListeQuestion
 {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;         /* espace libre uniquement */
    padding: 5px 8px 20px 5px;   /* plus de padding géant */
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    z-index: 1;
}


.Reponse {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;         /* espace libre uniquement */
    padding: 5px 8px 20px 5px;   /* plus de padding géant */
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
}


/* =========================================================
   ORDRE DES COUCHES
   ========================================================= */
.container,
.content,
.chat-messages,.ListeQuestion,
.Reponse,.map-container,
.Parametres {
    z-index: 1;
}

.legend_map,
.chat-input-area,
.pagination-container,
.progress-bar {
    z-index: 20;
}

.gradient-header,
.bottom-menu {
    z-index: 100;
}

.pagination-container,
.progress-bar,
.legend_map {
    margin-bottom: var(--home-menu-gap);
}