/* public/css/custom.css */

/* Variables Globales */
:root {
    /* Couleurs Principales */
    --bg-color: #f0f2f5;
    --surface-color: #ffffff;
    --primary-color: #1877f2;
    --primary-hover: #166fe5;
    --text-primary: #050505;
    --text-secondary: #65676b;
    --accent-color: #000000;
    
    /* Spacing & Radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --nav-height: 60px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-top: calc(var(--nav-height) + 20px);
    line-height: 1.5;
    background-image: url('../img/deal_bzh_logo-ok.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: contain; /* Affiche l'image en entier */
    opacity: 0.99; /* Force new stacking context */
}

/* Overlay pour améliorer la lisibilité sur le logo de fond */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 242, 245, 0.70); /* Transparence encore augmentée (0.85 -> 0.70) */
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

/* Navigation */
.navbar {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    height: var(--nav-height); /* Fixed height for desktop */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0;
    transition: height 0.3s ease; /* Smooth transition for mobile menu */
}

/* Mobile Responsive Menu Fix */
@media (max-width: 991.98px) {
    .navbar {
        height: auto; /* Let navbar expand on mobile */
        min-height: var(--nav-height);
        overflow: visible; /* Allow content to be seen */
    }

    .navbar-collapse {
        background-color: var(--surface-color);
        padding: 1rem;
        border-top: 1px solid rgba(0,0,0,0.05);
        margin-top: 10px; /* Spacing from logo */
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
        border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    }

    .navbar-nav .nav-link {
        padding: 10px 15px;
        border-radius: var(--border-radius);
    }
    
    .navbar-nav .nav-link:hover {
        background-color: #f0f2f5;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        background-color: rgba(0,0,0,0.05);
        border-radius: 50%;
    }
    
    /* Ensure buttons in menu have space */
    .nav-item .btn {
        width: 100%;
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .nav-item.ms-lg-3 {
        margin-left: 0 !important;
    }
    
    .dropdown-menu {
        border: none;
        background-color: #f8f9fa;
        margin-top: 0.5rem;
        box-shadow: none;
    }
}

.navbar .container {
    /* Removed fixed height 100% to allow flex wrapping on mobile if needed, 
       but for desktop we want it centered */
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for mobile menu */
}

/* Desktop adjustments to restore fixed height feel */
@media (min-width: 992px) {
    .navbar .container {
        height: 100%;
        flex-wrap: nowrap;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 35px; /* Reduced from 45px */
    width: auto;
    max-width: 100%;
}

/* DEAL.BZH Custom Font Styles */
.deal-font {
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: #000;
}

.deal-font-continuous {
    color: transparent;
    -webkit-text-stroke: 1.5px #333;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
}

.deal-font-dashed {
    /* Note: Dashed stroke on text is not fully supported in pure CSS without SVG. 
       This is a fallback to continuous or thin outline. */
    color: transparent;
    -webkit-text-stroke: 1px #333;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    /* Optional: opacity to distinguish */
    opacity: 0.8;
}

.deal-font-double {
    position: relative;
    color: transparent;
    -webkit-text-stroke: 6px #333;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    z-index: 1;
}

/* Requires data-text attribute to work properly for the inner line */
.deal-font-double::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    -webkit-text-stroke: 2px #f0f2f5; /* Should match background variable var(--bg-color) */
    z-index: 2;
    pointer-events: none;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin: 0 2px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline-secondary {
    background-color: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background-color: transparent;
}

.btn-deal {
    background-color: #000;
    color: #fff;
}
.btn-deal:hover {
    background-color: #333;
    color: #fff;
}

/* Cards */
.card {
    background-color: rgba(255, 255, 255, 0.6); /* Transparence augmentée (0.8 -> 0.6) */
    backdrop-filter: blur(10px); /* Effet de flou pour améliorer la lisibilité */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.5rem;
    flex: 1;
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Hero Section */
.hero-section {
    background-color: var(--surface-color);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    .hero-section {
        text-align: left;
        padding: 5rem;
    }
}

/* Utilities */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.rounded-3 { border-radius: var(--border-radius-lg) !important; }
.bg-white { background-color: var(--surface-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-muted { color: var(--text-secondary) !important; }

/* Forms */
.form-control, .form-select {
    background-color: #f0f2f5;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
    outline: none;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    padding: 3rem 0;
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer h5, footer h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
