/* ==========================================================================
   MELODINE - STYLES PRINCIPAUX (CSS Moderne Pur)
   ========================================================================== */

:root {
    /* Nuancier & Thème */
    --primary-color: #0077B6;
    --primary-hover: #005F92;
    --secondary-color: #90E0EF;
    --secondary-hover: #6DC2DF;
    --dark-color: #0F172A;
    --dark-light: #1E293B;
    --light-color: #F8FAFC;
    --white: #FFFFFF;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-600: #475569;
    --gray-800: #1E293B;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;

    /* Typographies */
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Spacing & Layout */
    --max-width: 1200px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 71, 110, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 71, 110, 0.12);
}

/* Reset CSS */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--light-color);
}

body {
    font-family: var(--font-body);
    color: var(--dark-color);
    line-height: 1.6;
    background-color: var(--light-color);
    overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.35rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

.grid-4 {
    grid-template-columns: 1fr;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* Badges / Chips */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: rgba(0, 119, 182, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: rgba(144, 224, 239, 0.2);
    color: #0096C7;
}

/* HEADER STYLE */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--dark-color);
}

.logo-icon {
    background-color: var(--primary-color);
    color: var(--white);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    font-weight: 900;
}

.desktop-nav ul {
    display: none; /* Mobile first hidden */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

/* Mobile Drawer */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background-color: var(--white);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 200;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.mobile-nav-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.close-drawer {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-color);
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--dark-color);
    display: block;
}

.drawer-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.hero p {
    color: var(--gray-300);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* CARDS & PRODUCT DIRECTORY */
.section-title {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.card-img-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: var(--gray-100);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(15, 23, 42, 0.85);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-brand {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--warning-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-rating span {
    color: var(--gray-600);
    font-weight: 400;
    margin-left: 0.25rem;
}

.card-desc {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-color);
}

.card-price::after {
    content: ' €';
    font-size: 1rem;
    font-weight: 600;
}

/* WIDGET : RECOMMANDATEUR INTERACTIF */
.recommender-box {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 2.5rem;
    max-width: 800px;
    margin: -3rem auto 0 auto;
    position: relative;
    z-index: 10;
}

.recommender-step {
    display: none;
}

.recommender-step.active {
    display: block;
    animation: fadeIn var(--transition-fast) forwards;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.option-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.option-card:hover, .option-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(0, 119, 182, 0.03);
}

.option-card i {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.option-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.recommender-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

/* OUTIL : CALCULATEUR ACOUSTIQUE */
.acoustic-tool {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.acoustic-form {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.acoustic-results {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.results-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--gray-600);
}

.results-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.mode-badge {
    background-color: #F8FAFC;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mode-frequency {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* COMPARATEUR DE PRODUITS */
.comparator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.comparator-select-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    border: 2px dashed var(--gray-300);
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.comparator-table-wrapper {
    overflow-x: auto;
    margin-top: 3rem;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.comparator-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.comparator-table th, .comparator-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.comparator-table th {
    background-color: var(--light-color);
    font-family: var(--font-heading);
    font-weight: 700;
}

/* FICHE ÉQUIPEMENT (PAGE PRODUIT) */
.product-hero {
    background-color: var(--white);
    padding: 4rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.product-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.product-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.product-info-header {
    margin-bottom: 1.5rem;
}

.product-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-rating-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #FEF3C7;
    color: #92400E;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-price-box {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin: 1.5rem 0;
}

.product-specs {
    margin-top: 3rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr:nth-child(even) {
    background-color: var(--gray-100);
}

.specs-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.specs-key {
    font-weight: 600;
    font-family: var(--font-heading);
    width: 40%;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.pro-box {
    background-color: rgba(16, 185, 129, 0.06);
    border-left: 5px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.con-box {
    background-color: rgba(239, 68, 68, 0.06);
    border-left: 5px solid var(--danger-color);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pros-cons-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.pros-cons-list li::before {
    position: absolute;
    left: 0;
    top: 2px;
}

.pro-box .pros-cons-list li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

.con-box .pros-cons-list li::before {
    content: '✗';
    color: var(--danger-color);
    font-weight: bold;
}

/* FOOTER STYLE */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 5rem 0 2rem 0;
    margin-top: 5rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    border-bottom: 1px solid var(--dark-light);
}

.logo-footer {
    color: var(--white);
}

.footer-desc {
    color: var(--gray-300);
    font-size: 0.92rem;
    margin-top: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--gray-300);
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: var(--gray-300);
    font-size: 0.92rem;
}

.footer-col a:hover {
    color: var(--secondary-color);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 2rem;
}

.footer-bottom-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-300);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.affiliate-notice {
    color: var(--gray-600) !important;
    font-size: 0.75rem !important;
}

/* REVEAL-ON-SCROLL ANIMATION */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE BREAKPOINTS */
@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .acoustic-tool {
        grid-template-columns: 1fr 1.2fr;
    }

    .product-layout {
        grid-template-columns: 1fr 1.2fr;
    }

    .pros-cons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Header Desktop */
    .mobile-toggle {
        display: none;
    }

    .desktop-nav ul {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .desktop-nav a {
        font-family: var(--font-heading);
        font-weight: 600;
        color: var(--gray-600);
        position: relative;
    }

    .desktop-nav a:hover, .desktop-nav a.active {
        color: var(--primary-color);
    }

    .desktop-nav a.active::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }

    .hero h1 {
        font-size: 4rem;
    }
}