@import url("dependencies.css");

:root {
    --black-1: rgba(3, 3, 3, 1); 
    --black-2: rgba(10, 10, 10, 1); 
    --black-3: rgba(17, 17, 17, 1); 
    --black-4: rgba(25, 25, 25, 1); 
    --black-1-50: rgba(3, 3, 3, .8); 
    --black-1-0: rgba(3, 3, 3, 0);
    --black-3-50: rgba(17, 17, 17, .8); 

    --green-1: #1F6B3A;
    --green-2: #14522C;
    --green-3: #2E8B57;

    --grey-1: rgba(48, 48, 48, 1); 
    --grey-2: rgba(69, 69, 69, 1); 
    --grey-3: rgba(126, 126, 126, 1); 

    --white-1: rgba(255, 255, 255, 1); 
    --white-2: rgba(230, 230, 230, 1); 
    --white-3: rgba(210, 210, 210, 1); 
    --white-4: rgba(190, 190, 190, 1); 
    --white-1-50: rgba(255, 255, 255, .8); 
    --white-1-0: rgba(255, 255, 255, 0); 

    --yellow-1: rgba(254, 185, 16, 1); 
    --yellow-2: rgba(255, 204, 0, 1); 
    --yellow-3: rgba(255, 218, 68, 1); 
    --yellow-4: rgba(255, 232, 138, 1); 
    --yellow-1-50: rgba(254, 185, 16, .8); 
    --yellow-1-0: rgba(254, 185, 16, 0); 

    --title-font: 'cat-font', sans-serif;
    --main-font: 'Open Sans', sans-serif;

    --title-font-size: 144px;
    --huge-font-size: 48px;
    --large-font-size: 32px;
    --medium-font-size: 18px;
    --regular-font-size: 14px;
    --small-font-size: 10px;
    --button-font-size: 14px;
}

.no-brand {
    --yellow-1: rgba(133, 150, 158, 1); 
    --yellow-2: rgba(156, 166, 175, 1); 
    --yellow-3: rgba(186, 195, 202, 1); 
    --yellow-4: rgba(201, 204, 209, 1); 
    --yellow-1-50: rgba(133, 150, 158, .8); 
    --yellow-1-0: rgba(133, 150, 158, 0); 
}

/* ============================================ */
/*           RESET & BASE                       */
/* ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--white-2);
    font-family: var(--main-font);
    color: var(--black-3);
    padding: 40px 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 200px;
    padding: 0 30px;
}

/* ============================================ */
/*           HEADER SECTION                     */
/* ============================================ */
.section-title {
    font-family: var(--title-font);
    font-size: var(--huge-font-size);
    font-weight: 900;
    color: var(--green-1);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.1;
}

.title-underline {
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--yellow-1), var(--green-1));
    margin-bottom: 25px;
    border-radius: 2px;
}

.section-description {
    color: var(--grey-2);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: var(--medium-font-size);
    max-width: 1100px;
}

.results-count {
    font-size: var(--regular-font-size);
    font-weight: 700;
    color: var(--green-1);
    padding: 18px 0;
    border-top: 2px solid var(--white-3);
    border-bottom: 2px solid var(--white-3);
    margin-bottom: 35px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ============================================ */
/*           CARROUSEL WRAPPER                  */
/* ============================================ */
.carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0 10px;
}

.carousel-container {
    position: relative;
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 24px;
    padding: 15px 5px 25px 5px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    cursor: grab;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

/* ============================================ */
/*           CARTE PRODUIT - DESKTOP (4 cartes) */
/* ============================================ */
.product-card {
    flex: 0 0 calc((100% - 72px) / 4); /* 4 cartes - (gap 24px × 3) */
    min-width: 0;
    background: var(--white-1);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    scroll-snap-align: start;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--white-3);
    z-index: 2;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--green-1), var(--yellow-1));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.carousel-container .product-card:hover {
    z-index: 1;
    transform: translateY(-7px) scale(0.96);
    opacity: 0.92;
    box-shadow: 0 14px 28px rgba(31, 107, 58, 0.15);
    border-color: var(--green-1);
}

.carousel-container:hover .product-card:not(:hover) {
    z-index: 3;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--green-1);
    letter-spacing: 1.3px;
    margin-bottom: 10px;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(31, 107, 58, 0.08);
    border-radius: 4px;
    text-transform: uppercase;
    width: fit-content;
}

.product-title {
    font-family: var(--title-font);
    font-size: 20px;
    font-weight: 700;
    color: var(--black-1);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.product-image {
    width: 100%;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--white-2) 0%, var(--white-1) 100%);
    border-radius: 8px;
    padding: 12px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-specs {
    flex-grow: 1;
    margin-bottom: 18px;
    border-top: 1px dashed var(--white-3);
    padding-top: 14px;
}

.spec {
    margin-bottom: 11px;
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--white-2);
}

.spec:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.spec-label {
    display: block;
    color: var(--grey-3);
    margin-bottom: 3px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.spec-value {
    display: block;
    color: var(--black-1);
    font-weight: 700;
    font-size: 14px;
}

.btn-explore {
    display: block;
    background: var(--green-1);
    color: var(--white-1);
    text-align: center;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1.3px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-explore::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--yellow-1);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-explore:hover {
    color: var(--black-1);
    box-shadow: 0 5px 14px rgba(254, 185, 16, 0.4);
}

.btn-explore:hover::before {
    left: 0;
}

/* ============================================ */
/*           FLÈCHES NAVIGATION                 */
/* ============================================ */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white-1);
    border: 2px solid var(--white-3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    color: var(--green-1);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
    line-height: 1;
}

.carousel-arrow:hover:not(:disabled) {
    background: var(--green-1);
    color: var(--white-1);
    border-color: var(--green-1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(31, 107, 58, 0.3);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

.carousel-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--white-2);
}

/* ============================================ */
/*           DOTS / INDICATEURS                 */
/* ============================================ */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding: 10px 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--white-3);
    cursor: pointer;
    transition: all 0.4s ease;
    border: none;
    padding: 0;
}

.dot:hover {
    background: var(--grey-3);
    transform: scale(1.2);
}

.dot.active {
    background: var(--green-1);
    width: 35px;
    border-radius: 5px;
}

/* ============================================ */
/*           BARRE PROGRESSION (optionnel)      */
/* ============================================ */
.carousel-progress {
    width: 100%;
    max-width: 300px;
    height: 3px;
    background: var(--white-3);
    border-radius: 3px;
    overflow: hidden;
    margin: 15px auto 0;
}

.carousel-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green-1), var(--yellow-1));
    transition: width 0.1s linear;
    border-radius: 3px;
}

/* ============================================================ */
/*  ============== RESPONSIVE - 4 NIVEAUX CLAIRS ============== */
/* ============================================================ */

/* ============================================ */
/*  💻 DESKTOP MOYEN (1025px - 1200px) → 4 cartes */
/* ============================================ */
@media (max-width: 1200px) and (min-width: 1025px) {
    .container {
        padding: 0 25px;
    }
    
    .carousel-container {
        gap: 20px;
    }
    
    .product-card {
        flex: 0 0 calc((100% - 60px) / 4); /* 4 cartes avec gap 20px */
        padding: 20px;
    }
}

/* ============================================ */
/*  📱 TABLETTE HORIZONTALE (901px - 1024px)    */
/*  → 3 cartes                                  */
/* ============================================ */
@media (max-width: 1024px) and (min-width: 901px) {
    body {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    .carousel-container {
        gap: 20px;
    }
    
    .product-card {
        flex: 0 0 calc((100% - 40px) / 3); /* 3 cartes - (gap × 2) */
        padding: 20px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 19px;
    }
    
    .carousel-prev {
        left: -10px;
    }
    
    .carousel-next {
        right: -10px;
    }
}

/* ============================================ */
/*  📱 TABLETTE PORTRAIT (601px - 900px)        */
/*  → 2 CARTES PAR LIGNE ✅                     */
/* ============================================ */
@media (max-width: 900px) and (min-width: 601px) {
    body {
        padding: 25px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 32px;
        letter-spacing: 1px;
    }
    
    .section-description {
        font-size: 15px;
        margin-bottom: 25px;
    }
    
    .results-count {
        padding: 14px 0;
        margin-bottom: 25px;
    }
    
    .carousel-wrapper {
        padding: 0;
    }
    
    .carousel-container {
        gap: 18px;
        padding: 15px 0 25px 0;
    }
    
    /* === EXACTEMENT 2 CARTES === */
    .product-card {
        flex: 0 0 calc((100% - 18px) / 2); /* 2 cartes - 1 gap */
        padding: 20px;
    }
    
    .product-title {
        font-size: 19px;
        margin-bottom: 14px;
    }
    
    .product-image {
        height: 165px;
        margin-bottom: 16px;
    }
    
    .spec {
        margin-bottom: 10px;
        padding-bottom: 8px;
        font-size: 13px;
    }
    
    .spec-label {
        font-size: 11px;
    }
    
    .spec-value {
        font-size: 14px;
    }
    
    .carousel-arrow {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .btn-explore {
        padding: 12px 16px;
        font-size: 12px;
    }
}

/* ============================================ */
/*  📱 MOBILE (381px - 600px)                   */
/*  → 1 CARTE PAR LIGNE ✅                      */
/* ============================================ */
@media (max-width: 600px) and (min-width: 381px) {
    body {
        padding: 20px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 26px;
        letter-spacing: 0.5px;
    }
    
    .title-underline {
        width: 50px;
        height: 3px;
        margin-bottom: 18px;
    }
    
    .section-description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .results-count {
        font-size: 12px;
        padding: 12px 0;
        margin-bottom: 20px;
    }
    
    .carousel-wrapper {
        padding: 0;
    }
    
    .carousel-container {
        gap: 15px;
        padding: 15px 20px 25px 20px;
    }
    
    /* === EXACTEMENT 1 CARTE === */
    .product-card {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 22px;
        scroll-snap-align: center;
    }
    
    /* Désactiver l'effet hover sur mobile */
    .carousel-container .product-card:hover {
        transform: none;
        opacity: 1;
        z-index: 2;
    }
    
    .carousel-container:hover .product-card:not(:hover) {
        z-index: 2;
    }
    
    .product-category {
        font-size: 10px;
        padding: 4px 9px;
        margin-bottom: 9px;
    }
    
    .product-title {
        font-size: 20px;
        margin-bottom: 14px;
    }
    
    .product-image {
        height: 200px;
        margin-bottom: 18px;
    }
    
    .spec {
        margin-bottom: 11px;
        padding-bottom: 8px;
        font-size: 14px;
    }
    
    .spec-label {
        font-size: 12px;
    }
    
    .spec-value {
        font-size: 15px;
    }
    
    .carousel-arrow {
        display: none;
    }
    
    .dot {
        width: 9px;
        height: 9px;
    }
    
    .dot.active {
        width: 30px;
    }
    
    .btn-explore {
        padding: 13px 18px;
        font-size: 13px;
    }
}

/* ============================================ */
/*  📱 PETIT MOBILE (380px et -)                */
/*  → 1 CARTE PAR LIGNE                         */
/* ============================================ */
@media (max-width: 380px) {
    body {
        padding: 15px 0;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .section-title {
        font-size: 22px;
        letter-spacing: 0.5px;
    }
    
    .title-underline {
        width: 45px;
        height: 3px;
        margin-bottom: 15px;
    }
    
    .section-description {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    .results-count {
        font-size: 11px;
        padding: 10px 0;
        margin-bottom: 18px;
    }
    
    .carousel-wrapper {
        padding: 0;
    }
    
    .carousel-container {
        gap: 12px;
        padding: 12px 15px 20px 15px;
    }
    
    /* === 1 CARTE PLEINE LARGEUR === */
    .product-card {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 18px;
        scroll-snap-align: center;
    }
    
    .carousel-container .product-card:hover {
        transform: none;
        opacity: 1;
        z-index: 2;
    }
    
    .carousel-container:hover .product-card:not(:hover) {
        z-index: 2;
    }
    
    .product-category {
        font-size: 9px;
        padding: 3px 8px;
        margin-bottom: 8px;
    }
    
    .product-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .product-image {
        height: 175px;
        margin-bottom: 15px;
    }
    
    .spec {
        margin-bottom: 9px;
        padding-bottom: 7px;
        font-size: 13px;
    }
    
    .spec-label {
        font-size: 11px;
    }
    
    .spec-value {
        font-size: 13px;
    }
    
    .carousel-arrow {
        display: none;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        width: 26px;
    }
    
    .btn-explore {
        padding: 11px;
        font-size: 12px;
        letter-spacing: 1px;
    }
}

/* ============================================ */
/*           ANIMATIONS                         */
/* ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }

/* ============================================ */
/*           ACCESSIBILITÉ                      */
/* ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.carousel-arrow:focus-visible,
.dot:focus-visible,
.btn-explore:focus-visible {
    outline: 3px solid var(--yellow-1);
    outline-offset: 3px;
}


*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family: 'Segoe UI', sans-serif;
    background:#f4f6fa;
    padding:60px 20px;
}

.carousel-section{
    max-width:1300px;
    margin:auto;
}
/* ===== Wrapper ===== */
.carousel-wrapper{
    position:relative;
    overflow:hidden;
}

/* ===== Track ===== */
.carousel-track{
    display:flex;
    transition:transform 0.6s ease-in-out;
}

/* ===== Card ===== */
.card{
    flex:0 0 100%;
    padding:15px;
}

@media(min-width:768px){
    .card{ flex:0 0 50%; }
}

@media(min-width:1100px){
    .card{ flex:0 0 33.33%; }
}

.card > div,
.card img{
    border-radius:18px;
}

.card img{
    width:100%;
    height:260px;
    object-fit:cover;
    display:block;
    border-radius:18px 18px 0 0;
}

.card-content{
    background:#fff;
    padding:20px;
    border-radius:0 0 18px 18px;
    box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.card h2{
    font-size:18px;
    margin-bottom:8px;
}

.card p{
    font-size:14px;
    color:#6b7280;
    margin-bottom:10px;
}

.price{
    font-weight:bold;
    color:#0a7cff;
    display:block;
    margin-bottom:15px;
}

/* ===== Card Buttons ===== */
.card-buttons{
    display:flex;
    gap:10px;
}

.btn{
    flex:1;
    padding:10px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-weight:600;
    transition:0.3s;
}

.primary{
    background:green;
    color:#fff;
}

.primary:hover{
    background:green;
}

.secondary{
    background:#e5e7eb;
}

.secondary:hover{
    background:#d1d5db;
}

/* ===== Navigation ===== */
.nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:45px;
    height:45px;
    border-radius:50%;
    border:none;
    background:#fff;
    cursor:pointer;
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    z-index:10;
}

.prev{ left:10px; }
.next{ right:10px; }

.nav:hover{
    background:green;
    color:#fff;
}

@media(max-width:768px){
    .nav{ display:none; }
}