@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800;900&display=swap");

/* ===============================
   BASE - DESKTOP
================================ */

/* Forcer l'affichage du header-top */
.header-top {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    overflow: visible !important;
}

.header-top-row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
}

.header-top-welcome {
    width: 100%;
    display: block !important;
    visibility: visible !important;
}

/* S'assurer que les colonnes sont visibles */
.header-top-row > [class*="col-"] {
    display: block !important;
    visibility: visible !important;
}

/* TITRE */
.site-title {
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
}

/* LETTRES COULEUR */
.first-letter {
    color: #F6572D;
}

/* SLOGAN */
.tagline {
    margin-top: 4px;
    font-family: 'Rubik', sans-serif;
    font-style: italic;
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    line-height: 1.4;
    white-space: nowrap;
}

/* ===============================
   HEADER AUTH
================================ */

.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Boutons header - Version compacte */
.header-widget {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    color: #2D8A4A;
    background-color: #f1f8f4;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.header-widget i {
    font-size: 12px;
}

.header-widget:hover {
    background-color: #f1f8f4;
    color: #fff;
    border-color: #2D8A4A;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.2);
}

/* Bouton logout */
.header-widget.logout {
    color: #fff;
    background-color: #FCEABB;
    border-color: #FCEABB;
}

.header-widget.logout:hover {
    background-color: #FCEABB;
    color: #fff;
    border-color: #FCEABB;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
}

span .header-widget.logout:hover {

    color: #fff;

}

/* ===============================
   RESPONSIVE - TABLETTE (≤ 992px)
================================ */

@media (max-width: 992px) {
    .site-title {
        font-size: 24px;
    }

    .tagline {
        font-size: 13px;
        white-space: nowrap;
    }

    .header-auth {
        gap: 8px;
    }

    .header-widget {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 7px;
    }

    .header-widget i {
        font-size: 11px;
    }
}

/* ===============================
   RESPONSIVE - TABLETTE PETITE (≤ 768px)
================================ */

@media (max-width: 768px) {
    .header-top-row {
        padding: 8px 0;
    }

    .site-title {
        font-size: 20px;
    }

    .tagline {
        font-size: 12px;
        margin-top: 2px;
        white-space: nowrap;
    }

    .header-auth {
        gap: 6px;
    }

    .header-widget {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 6px;
        gap: 4px;
    }

    .header-widget i {
        font-size: 10px;
    }
}

/* ===============================
   RESPONSIVE - MOBILE (≤ 576px)
================================ */

@media (max-width: 576px) {
    /* Ajuster la grille Bootstrap */
    .header-top-row > div[class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .site-title {
        font-size: 18px;
        line-height: 1.15;
    }

    .tagline {
        font-size: 11px;
        margin-top: 2px;
        white-space: nowrap;
    }

    .header-auth {
        gap: 5px;
        justify-content: flex-end;
    }

    .header-widget {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 5px;
        gap: 3px;
    }

    .header-widget i {
        font-size: 9px;
    }

    .header-widget span {
        max-width: 65px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===============================
   RESPONSIVE - PETIT MOBILE (≤ 480px)
================================ */

@media (max-width: 480px) {
    .header-top-row {
        padding: 6px 0;
    }

    .site-title {
        font-size: 16px;
        letter-spacing: -0.3px;
    }

    .tagline {
        font-size: 10px;
        opacity: 0.95;
        white-space: nowrap;
    }

    .header-auth {
        gap: 4px;
    }

    .header-widget {
        padding: 4px 7px;
        font-size: 9px;
        border-radius: 4px;
        gap: 2px;
    }

    .header-widget i {
        font-size: 8px;
    }

    .header-widget span {
        max-width: 80px;
    }
}

/* ===============================
   RESPONSIVE - TRÈS PETIT MOBILE (≤ 400px)
================================ */

@media (max-width: 400px) {
    .site-title {
        font-size: 14px;
        letter-spacing: -0.5px;
    }

    .tagline {
        font-size: 9px;
    }

    .header-auth {
        gap: 15px;
        white-space: nowrap;
    }

    .header-widget {
        padding: 3px 6px;
        font-size: 9px;
        border-radius: 4px;
    }

    .header-widget i {
        font-size: 8px;
    }

    .header-widget span {
        max-width: 80px;
    }
}

/* ===============================
   RESPONSIVE - ULTRA PETIT (≤ 360px)
================================ */

@media (max-width: 360px) {
    .site-title {
        font-size: 13px;
    }

    .tagline {
        display: flex; /* Masquer le slogan sur très petits écrans */
    }

    .header-auth {
        gap: 2px;
    }

    .header-widget {
        padding: 3px 5px;
        font-size: 8px;
        border-radius: 3px;
    }

    .header-widget i {
        font-size: 7px;
    }

    .header-widget span {
        max-width: 40px;
    }
}

/* ===============================
   SÉLECTEUR DE LANGUE - AJUSTEMENTS MOBILE
================================ */

@media (max-width: 576px) {
    .language-selector-1 .current-lang {
        min-width: 100px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .language-selector-1 .flag {
        font-size: 16px;
    }

    .language-selector-1 .lang-name {
        font-size: 11px;
    }

    .language-selector-1 .arrow {
        font-size: 10px;
    }

    .language-selector-1 .dropdown-item {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .language-selector-1 .current-lang {
        min-width: 80px;
        padding: 5px 8px;
    }

    .language-selector-1 .flag {
        font-size: 14px;
    }

    .language-selector-1 .lang-name {
        font-size: 15px;
    }
}


/* ===============================
   ALTERNATIVE : ICÔNES UNIQUEMENT (≤ 360px)
   Décommentez si vous préférez n'afficher que des icônes
================================ */

@media (max-width: 360px) {
    /* Masquer le texte, garder seulement les icônes */
    .header-widget span {
        display: none;
    }

    .header-widget i {
        display: inline-block !important;
        font-size: 14px;
        margin: 0;
    }

    .header-widget {
        padding: 6px;
        min-width: 32px;
        min-height: 32px;
        justify-content: center;
    }

    /* Ajouter des icônes pour ceux qui n'en ont pas */
    .header-widget:not(:has(i))::before {
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 14px;
    }

    .header-widget[href*="register"]:not(:has(i))::before {
        content: "\f234"; /* user-plus */
    }

    .header-widget[href*="login"]:not(:has(i))::before {
        content: "\f2f6"; /* sign-in-alt */
    }
}

/* ===============================
   ALTERNATIVE : VERSION ICÔNES UNIQUEMENT
   Décommentez cette section si vous voulez afficher
   seulement des icônes sur très petits écrans
================================ */

/*
@media (max-width: 360px) {
    .header-widget span {
        display: none;
    }

    .header-widget::before {
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
    }

    .header-widget[href*="register"]::before {
        content: "\f234"; /* Icône user-plus
    }

    .header-widget[href*="login"]::before {
        content: "\f2f6"; /* Icône sign-in
    }

    .header-widget.logout::before {
        content: "\f2f5"; /* Icône sign-out
    }
}
*/
