/* ===================== VARIABLES GLOBALES ===================== */
:root {
    --blue: #004a99;
    --blue-light: #e6edf5;
    --dark: #1b1b1b;
    --text: #333;
    --radius: 8px;
}

/* ===================== RESET / BODY ===================== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: var(--text);
}

/* ===================== CONTENEUR ===================== */
.container {
    width: 92%;
    max-width: 1300px;
    margin: auto;
}

/* ===================== HEADER (NOUVEAU DESIGN) ===================== */
.header {
    background: #fff !important;
    color: var(--blue) !important;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    font-family: Verdana, sans-serif;
    color: var(--blue) !important;
}

/* ===================== NAVIGATION ===================== */
.nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav a {
    color: var(--blue) !important;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.nav a:hover {
    background: rgba(0,74,153,0.12);
    color: var(--blue);
}

/* ===================== BOUTONS CONNEXION / LANGUE ===================== */
.user-lang-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-lang-block select {
    padding: 5px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid var(--blue);
    cursor: pointer;
    background: white;
    color: var(--blue);
}

.user-lang-block .welcome {
    font-weight: bold;
    color: var(--blue);
    font-family: Verdana, sans-serif;
    font-size: 14px;
}

.user-lang-block .btn-login,
.user-lang-block .btn-logout {
    padding: 6px 12px;
    background-color: var(--blue);
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 14px;
}

.user-lang-block .btn-login:hover,
.user-lang-block .btn-logout:hover {
    background-color: #003a78;
}

/* Bloc général langue (desktop & mobile) */
.lang-select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #d0d0d0;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Icône */
.lang-icon {
    font-size: 30px;
    color: #005bbb; /* bleu thème */
}

/* Select */
.lang-select,
.lang-select-mobile {
    border: none;
    background: transparent;
    font-size: 15px;
    color: #005bbb;
    cursor: pointer;
    outline: none;
    appearance: none;
    padding-right: 20px;
}

/* Flèche FontAwesome (custom dropdown) */
.lang-select-wrapper {
    position: relative;
}

.lang-select-wrapper::after {
    content: "\f078"; /* fa-chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 10px;
    font-size: 12px;
    color: #005bbb;
    pointer-events: none;
}


/* ===================== BURGER MENU ===================== */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--blue) !important;
    border-radius: 2px;
}

/* ===================== MENU MOBILE (NOUVEAU DESIGN) ===================== */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    background: #fff !important;
    padding: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid #ddd;
}

.mobile-menu.active {
    max-height: 500px;
}

.mobile-menu a {
    color: var(--blue) !important;
    text-decoration: none;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.user-lang-block-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.user-lang-block-mobile select {
    padding: 5px;
    font-size: 14px;
    border: 1px solid var(--blue);
    border-radius: 6px;
    color: var(--blue);
    background: #fff;
}

/* ===================== HERO ===================== */
.hero {
    background: var(--blue-light);
    padding: 35px 0;
    text-align: center;
}

.search-box {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.search-box input {
    padding: 12px;
    width: 400px;
    border: 1px solid #999;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: Verdana, sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

.search-box input.fiibm-marker-input {
    box-sizing: border-box;
    padding-left: 52px;
    padding-right: 52px;
    background-color: #fff;
    background-image: url("images/marqueur.png"), url("images/marqueur.png");
    background-repeat: no-repeat, no-repeat;
    background-position: left 7px center, right 7px center;
    background-size: 15px 15px, 15px 15px;
}

.search-box button {
    padding: 12px 20px;
    border: none;
    background: var(--blue);
    color: white;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

/* ===================== CHAMPS / ERREURS ===================== */
#charCount, .char-count {
    font-size: 12px;
    color: #555;
    display: none;
    margin-top: 5px;
}

#errorMsg {
    font-size: 12px;
    color: #c00;
    font-weight: bold;
    display: none;
}

.input-error {
    border: 2px solid #c00 !important;
    box-shadow: 0 0 4px rgba(200,0,0,0.15);
}

.disabled-submit {
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* ===================== SERVICES / CARDS ===================== */
.services h2 {
    text-align: center;
    margin-bottom: 30px;
}

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

.card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform .15s;
}

.card:hover {
    transform: translateY(-4px);
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    background: var(--blue);
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
    margin-top: 10px;
}

/* ===================== IMAGES / FEATURES ===================== */
.card-title-with-icon {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-with-icon img.card-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-left: 10px;
    opacity: 0.9;
}

/* ===================== FOOTER ===================== */
.footer {
    background: var(--dark);
    color: #ccc;
    padding: 40px 0;
    margin-top: 40px;
}

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

.footer h4 {
    color: white;
}

/* ===================== FEATURE BLOCKS ===================== */
.feature-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 40px 0;
}

.feature-block:nth-child(odd) {
    background: #f7f7f7;
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.feature-text p {
    font-size: 16px;
    color: #555;
}

.feature-image {
    width: 260px;
    flex-shrink: 0;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .mobile-menu {
        display: none;
    }

    .mobile-menu.open {
        display: flex;
    }
}

@media (max-width: 768px) {
    .feature-block {
        flex-direction: column;
        text-align: center;
    }

    .feature-image {
        width: 60%;
        margin-top: 20px;
    }

    .nav a, .user-lang-block {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }
}

@media (max-width: 600px) {
    .search-box input, .search-box button {
        width: 100%;
        border-radius: var(--radius);
        margin-bottom: 10px;
    }
}
