/**
 * NAVIGATION & FOOTER - STYLES CSS
 * Fichier de styles pour la navigation, menu hamburger et footer de contact
 *
 * Organisation:
 * 1. Navigation bar
 * 2. Hamburger menu
 * 3. Side menu
 * 4. Menu overlay
 * 5. App content layout
 * 6. Footer de contact
 * 7. Media queries responsive
 */

/* ========================================
   1. NAVIGATION BAR
   ======================================== */

/**
 * Barre de navigation fixe en haut de page
 * Utilise un dégradé dynamique depuis les variables CSS de branding
 * Les variables --nav-gradient-start et --nav-gradient-end sont définies dans base.html
 */
.app-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--nav-gradient-start) 0%, var(--nav-gradient-end) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
}

/**
 * Titre ou logo de l'app dans la navigation
 */
.app-nav-title {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/**
 * Logo de l'app dans la navigation
 */
.nav-logo {
    max-height: 40px;
    max-width: 150px;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* ========================================
   2. HAMBURGER MENU
   ======================================== */

/**
 * Bouton hamburger pour ouvrir le menu latéral
 */
.hamburger-menu {
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

/**
 * Lignes du hamburger menu
 */
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/**
 * Animation hamburger → X quand le menu est ouvert
 */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ========================================
   3. SIDE MENU
   ======================================== */

/**
 * Menu latéral qui glisse depuis la gauche
 */
.side-menu {
    position: fixed;
    top: 60px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

/**
 * État actif du menu latéral
 */
.side-menu.active {
    left: 0;
}

/**
 * Section de menu avec titre
 */
.menu-section {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #ecf0f1;
}

/**
 * Titre de section de menu
 */
.menu-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

/**
 * Item de menu individuel
 */
.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

/**
 * Effet hover sur item de menu
 */
.menu-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/**
 * Icône d'item de menu
 */
.menu-item-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

/**
 * Texte d'item de menu
 */
.menu-item-text {
    flex: 1;
    font-weight: 500;
}

/* ========================================
   4. MENU OVERLAY
   ======================================== */

/**
 * Overlay sombre derrière le menu latéral
 */
.menu-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

/**
 * État actif de l'overlay
 */
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   5. APP CONTENT LAYOUT
   ======================================== */

/**
 * Conteneur principal du contenu
 * Margin-top pour éviter que le contenu soit caché sous la nav fixe
 * Padding-bottom pour le footer fixe
 */
.app-content {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    padding-bottom: 120px; /* Height of footer + extra margin for mobile */
}

/**
 * Conteneur interne de l'app
 */
.app-container {
    flex: 1;
}

/* ========================================
   6. SOCIAL MEDIA ICONS (NAV)
   ======================================== */

/**
 * Icônes de réseaux sociaux dans la navigation
 */
.nav-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-social a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-social a:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* ========================================
   7. FOOTER DE CONTACT FIXE
   ======================================== */

/**
 * Footer fixe en bas avec boutons de contact
 */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 900;
    padding: 0.75rem 1rem;
}

/**
 * Titre du footer
 */
.footer-title {
    text-align: center;
    color: white;
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}

/**
 * Grille de boutons de contact
 */
.footer-contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

/**
 * Bouton de contact (WhatsApp ou Téléphone)
 */
.footer-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/**
 * Texte des boutons de contact
 */
.footer-contact-btn .btn-text {
    display: inline;
}

/**
 * Bouton WhatsApp avec gradient vert
 */
.footer-contact-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.footer-contact-btn.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/**
 * Bouton téléphone avec gradient bleu
 */
.footer-contact-btn.phone {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.footer-contact-btn.phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/**
 * Icônes des boutons de contact
 */
.footer-contact-btn svg,
.footer-contact-btn .icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ========================================
   8. MEDIA QUERIES RESPONSIVE
   ======================================== */

/**
 * Très petits écrans (< 480px)
 * Cache le texte des boutons de contact, garde uniquement les icônes
 */
@media (max-width: 480px) {
    .footer-contact-btn .btn-text {
        display: none;
    }
}

/**
 * Tablettes et petits écrans (< 768px)
 * Ajuste le padding du contenu pour footer
 */
@media (max-width: 768px) {
    .app-content {
        padding-bottom: 100px; /* Moins de padding car boutons côte à côte */
    }
}
