/* ==================== VARIABLES ==================== */
:root {
    --primary-gray: #A3A0A0;
    --dark-gray: #6B6868;
    --light-gray: #D4D2D2;
    --bg-gray: #F5F4F4;
    --white: #FFFFFF;
    --text-dark: #2C2A2A;
    --border-color: #E0DEDE;
    --accent: #8A8787;
    --success: #7FA37F;
    --warning: #C99A6E;
    --danger: #B87C7C;
    --shadow: rgba(163, 160, 160, 0.15);
    --shadow-hover: rgba(163, 160, 160, 0.25);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== BODY ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 0;
}

/* ==================== AUTH WRAPPER ==================== */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

/* ==================== AUTH HEADER ==================== */
.auth-header {
    background: var(--white);
    border-radius: 16px 16px 0 0;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo-img {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.auth-title {
    font-size: 1.8em;
    color: var(--text-dark);
    font-weight: 700;
    margin: 0;
}

/* ==================== LOGIN CARD ==================== */
.login-card {
    background: var(--white);
    border-radius: 0 0 16px 16px;
    padding: 40px;
    box-shadow: 0 8px 32px var(--shadow);
}

.login-title {
    font-size: 1.8em;
    color: var(--dark-gray);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

/* ==================== ERROR MESSAGE ==================== */
.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: var(--danger);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    border-left: 4px solid var(--danger);
}

.error-icon {
    font-size: 1.3em;
}

/* ==================== FORM ==================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--primary-gray);
    box-shadow: 0 0 0 3px rgba(163, 160, 160, 0.1);
}

/* ==================== CHECKBOX GROUP ==================== */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-gray);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

/* ==================== CHAUFFEUR GROUP ==================== */
.chauffeur-group {
    background: var(--bg-gray);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--warning);
    position: relative;
}

.info-icon {
    margin-left: auto;
    cursor: help;
    font-size: 1.2em;
    position: relative;
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--text-dark);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85em;
    width: 200px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border: 6px solid transparent;
    border-top-color: var(--text-dark);
}

.info-icon:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* ==================== BUTTONS ==================== */
.login-btn {
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-gray) 0%, var(--dark-gray) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.login-btn:active {
    transform: translateY(0);
}

/* ==================== CONTACT LINK ==================== */
.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--bg-gray);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.contact-link:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.2em;
}

/* ==================== LANGUAGE SWITCHER ==================== */
.language-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.language-switcher img {
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.language-switcher img:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ==================== SIGNATURE PUB ==================== */
.signature-container {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    width: 100%;
    max-width: 450px;     /* même largeur que .auth-wrapper */
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;  /* même radius que tes cards */
    overflow: hidden;     /* important pour arrondir l’image */
    box-shadow: 0 4px 20px var(--shadow);
    animation: fadeInUp 0.6s ease;
}

.signature-container img {
    width: 100%;
    display: block;       /* supprime l’espace blanc sous l’image */
}

/* ==================== INSTALL BANNER ==================== */
.install-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-hover);
    padding: 20px;
    max-width: 500px;
    width: 90%;
    z-index: 2000; /* Augmenté pour être au-dessus de tout */
    animation: slideDown 0.4s ease;
    display: block; /* Visible par défaut */
}

.install-banner.hidden {
    display: none !important;
}

.install-content {
    margin-bottom: 15px;
}

.install-content strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.install-content p {
    margin: 0;
    color: var(--dark-gray);
    font-size: 0.95em;
    line-height: 1.6;
}

.install-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.install-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

#install-btn {
    background: #6B6868;
    color: white;
}

#install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 163, 127, 0.4);
}

#close-btn {
    background: var(--light-gray);
    color: var(--text-dark);
    padding: 12px 20px;
}

#close-btn:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}/* ==================== HIDDEN CLASS ==================== */
.hidden {
    display: none !important;
}
/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 480px) and (max-width: 2900px) {
    body {
        padding: 5px;
    }

    .login-card {
        padding: 15px 12px;
    }

    .auth-header {
        padding: 10px 10px;
    }

    /* Logos côte à côte */
    .logos-container {
        display: flex;
        flex-direction: row;        /* côte à côte */
        justify-content: center;
        align-items: center;
        gap: 6px;                   /* espace réduit entre logos */
        margin-bottom: 8px;
    }

    .logo-img {
        max-height: 38px;           /* logos un peu plus petits */
    }

    .auth-title,
    .login-title {
        font-size: 1.15em;
        margin: 6px 0;              /* moins d’espace vertical */
    }

    .tooltip {
        width: 160px;
        font-size: 0.85em;
    }
}

@media (max-width: 479px) {
    body {
        padding: 5px;
    }

    .login-card {
        padding: 15px 12px;
    }

    .auth-header {
        padding: 10px 10px;
    }

    /* Logos côte à côte */
    .logos-container {
        display: flex;
        flex-direction: row;        /* côte à côte */
        justify-content: center;
        align-items: center;
        gap: 6px;                   /* espace réduit entre logos */
        margin-bottom: 8px;
    }

    .logo-img {
        max-height: 38px;           /* logos un peu plus petits */
    }

    .auth-title,
    .login-title {
        font-size: 1.15em;
        margin: 6px 0;              /* moins d’espace vertical */
    }

    .tooltip {
        width: 160px;
        font-size: 0.85em;
    }
}
