/* CONFIGURATION GÉNÉRALE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #122631;
    /* Bleu ardoise très pro */
    --accent: #e04f39;
    /* Rouge/Orange chaleureux pour l'action */
    --bg-light: #f4f6f8;
    /* Fond très clair et doux */
    --white: #ffffff;
    --text: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
}

/* BOUTONS */
.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.btn-primary:hover {
    background-color: #c53e2a;
}

.btn-secondary {
    border: 1px solid #cbd5e1;
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 20px;
}

.btn-accent-full {
    display: block;
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
}

/* HEADER */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 100;
}

/* Le header etant sticky, on decale les ancres de scroll pour que les
   titres ne soient pas caches/coupes derriere lui au clic sur le menu. */
#packs, #concept, #clement, #faq {
    scroll-margin-top: 110px;
}

.main-nav a {
    text-decoration: none;
    color: #64748b;
    margin: 0 15px;
    font-weight: 500;
}

/* Liens connexion/inscription dupliqués dans le menu burger : masqués par défaut
   (déjà visibles sous forme de boutons dans .header-actions), affichés uniquement
   quand ces boutons sont eux-mêmes cachés (voir @media max-width:768px). */
.nav-auth-link { display: none; }

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--primary);
    background: var(--bg-light);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.cart-link svg {
    width: 21px;
    height: 21px;
}

.cart-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--white);
}

.user-greeting {
    margin-right: 16px;
    color: #1f2937;
    font-weight: 600;
    white-space: nowrap;
}

/* HEADER ET MENU - AJUSTEMENT DU LOGO */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Aligne verticalement le logo et le menu */
    padding: 20px 5%;
    background: var(--white);
    position: relative;
    /* Pour que le menu mobile se positionne par rapport à ça */
}

/* On enlève les styles de texte brut sur la div.logo */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Le style de l'image du logo elle-même */
.site-logo {
    height: 68px;
    /* Ajuste cette hauteur selon la forme de ton logo */
    width: auto;
    /* Laisse la largeur s'adapter proportionnellement */
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.hero-sub {
    font-size: 18px;
    margin-bottom: 30px;
    color: #475569;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quick-drop-box {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 2px dashed #cbd5e1;
}

.quick-drop-box h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* SECTION PACKS */
.packs-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h1 {
    font-size: 42px;
    color: var(--primary);
    line-height: 1.15;
    margin-bottom: 15px;
}

.section-title .hero-sub {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section-title .hero-buttons {
    justify-content: center;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary);
}

/* SECTION PACKS - ALIGNEMENT HORIZONTAL */
.packs-section {
    padding: 80px 5%;
    max-width: 1500px;
    /* On élargit un peu la zone pour aligner plus de packs */
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary);
}

/* La grille magique : affiche les packs les uns à côté des autres */
.packs-grid {
    display: grid;
    /* Crée autant de colonnes de 300px que possible les unes à côté des autres */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    align-items: stretch;
    /* Force toutes les cartes à avoir exactement la même hauteur */
}

.pack-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    padding: 25px;
    border-radius: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Requis pour que l'image ne dépasse pas des arrondis de la carte */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Petit effet sympa au survol de la carte */
.pack-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* AJUSTEMENT DES IMAGES DANS LES PACKS */
.pack-card-img {
    width: calc(100% + 50px);
    /* Aligne l'image pile sur les bords gauche/droite */
    margin: -25px -25px 20px -25px;
    /* Remonte l'image tout en haut en annulant la marge interne */
    height: 160px;
    /* Hauteur fixe pour que toutes les images soient alignées */
    object-fit: cover;
    /* Recadre l'image proprement sans l'écraser */
}

.pack-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 19px;
}

.pack-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Pousse le prix et le bouton vers le bas pour qu'ils soient tous alignés */
}

.pack-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 15px 0;
}

.pack-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fee2e2;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    /* Reste au-dessus de l'image */
}

.btn-card {
    display: block;
    text-align: center;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

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

/* Ajustements pour les cartes spéciales */
.pack-card.highlight {
    border: 2px solid var(--accent);
    background: #fffaf9;
}

.pack-card.warning {
    border: 1px dashed #eab308;
    background: #fefce8;
}

.pack-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 20px;
}

.pack-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    flex-grow: 1;
}

.pack-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 15px 0;
}

.pack-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fee2e2;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.btn-card {
    display: block;
    text-align: center;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

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

/* VARIANTES CARDS */
.pack-card.highlight {
    border: 2px solid var(--accent);
    background: #fffaf9;
}

.pack-card.warning {
    border: 1px dashed #eab308;
    background: #fefce8;
}

.pack-options {
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
}

.pack-options span {
    display: block;
    margin-bottom: 4px;
}

/* SECTION PROFIL CLEMENT */
.profile-section {
    background: var(--bg-light);
    padding: 80px 5%;
}

.profile-container {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    gap: 50px;
    align-items: center;
}

.profile-img-placeholder {
    flex: 0.8;
    background: #e2e8f0;
    border-radius: 20px;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid #cbd5e1;
}

.avatar-mock {
    font-size: 70px;
    margin-bottom: 15px;
}

.profile-text {
    flex: 1.2;
}

.mini-title {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.profile-text h2 {
    font-size: 32px;
    color: var(--primary);
    margin: 10px 0 20px 0;
}

.profile-text p {
    margin-bottom: 15px;
    color: #475569;
}

.profile-badges {
    margin-top: 25px;
    display: flex;
    gap: 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

.profile-photo {
    width: 100%;
    height: 350px;
    object-fit: cover;
    /* Permet de cadrer la photo proprement sans la déformer */
    border-radius: 20px;
    /* Conserve le bel arrondi */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* SECTION FAQ (categories a gauche + accordeon a droite) */
.faq-section {
    padding: 60px 5% 80px;
    background: var(--bg-light);
    text-align: center;
}

.faq-layout {
    display: flex;
    gap: 30px;
    max-width: 1300px;
    margin: 30px auto 0;
    text-align: left;
    align-items: flex-start;
}

.faq-categories {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
}

.faq-category {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.faq-category:hover {
    background: var(--bg-light);
}

.faq-category.active {
    background: var(--primary);
    color: var(--white);
}

.faq-questions {
    flex: 1;
    min-width: 0;
}

.faq-group {
    display: none;
}

.faq-group.active {
    display: block;
}

.faq-accordion-item {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-accordion-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    font-family: inherit;
}

.faq-accordion-icon {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 400;
    color: var(--accent);
    transition: transform 0.2s;
}

.faq-accordion-item.open .faq-accordion-icon {
    transform: rotate(45deg);
}

.faq-accordion-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.faq-accordion-item.open .faq-accordion-answer {
    max-height: 300px;
}

.faq-accordion-answer p {
    padding: 0 22px 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    max-width: 700px;
}

/* FOOTER STYLE */
.site-footer {
    background: #122631;
    /* On reprend ton bleu ardoise foncé */
    color: #cbd5e1;
    padding: 60px 5% 20px 5%;
    font-size: 14px;
    margin-top: 8px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col p {
    margin: 0 0 12px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent);
    /* Devient orange/rouge au survol */
}

.footer-col p a {
    display: inline-block;
    background: #ffffff;
    color: #122631 !important;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.footer-col p a:hover {
    background: var(--accent);
    color: #ffffff !important;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #334155;
    font-size: 12px;
}

.footer-bottom a {
    color: #cbd5e1;
    text-decoration: underline;
}

/* SECTION CONCEPT - COMMENT ÇA MARCHE */
.concept-section {
    padding: 80px 5%;
    background: #ffffff;
    text-align: center;
}

/* Carte devis + bloc "3 etapes" cote a cote pour gagner de la place verticale */
.concept-with-devis {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    flex-wrap: wrap;
}

.concept-with-devis .devis-card {
    flex: 0 0 340px;
    max-width: 340px;
    margin: 0 auto;
}

.concept-main {
    flex: 1;
    min-width: 280px;
}

.concept-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 40px auto 0 auto;
    flex-wrap: wrap;
}

.concept-card {
    flex: 1;
    min-width: 280px;
    background: #f8fafc;
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: transform 0.2s;
}

.concept-card:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 45px;
    height: 45px;
    background: #122631;
    /* Ton bleu ardoise */
    color: #ffffff;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px auto;
}

.concept-card h3 {
    color: #122631;
    font-size: 18px;
    margin-bottom: 12px;
}

.concept-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* Effet de défilement fluide pour toute la page */
html {
    scroll-behavior: smooth;
}
/* ══════════════════════════════════════════════
   RESPONSIVE — TABLETTE (max 1024px)
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .section-title h1 { font-size: 38px; }

    .packs-container {
        gap: 18px !important;
    }

    .profile-container {
        flex-direction: column;
        gap: 30px;
    }
    .profile-img-container { width: 100%; }
    .profile-photo { height: 280px; width: 100%; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — HEADER (max 1300px)
   La nav + les actions (bonjour, boutons, panier) sont trop
   nombreuses pour tenir sur une seule ligne dès qu'on quitte
   les très grands écrans : on bascule sur le menu burger plus tôt
   pour éviter que le texte des liens/boutons ne s'écrase et
   passe à la ligne dans son propre bouton.
══════════════════════════════════════════════ */
@media (max-width: 1300px) {
    .main-header {
        flex-wrap: wrap;
        gap: 12px;
        position: relative;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        background: white;
        border-top: 1px solid #e2e8f0;
        padding: 10px 0;
        order: 3;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        padding: 10px 16px;
        border-radius: 0;
        margin: 0;
        font-size: 15px;
        border-bottom: 1px solid #f1f5f9;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        order: 2;
    }

    .burger-btn {
        display: flex !important;
        order: 2;
        background: none;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        padding: 6px 10px;
        cursor: pointer;
        font-size: 18px;
        color: #122631;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE (max 768px)
══════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── HEADER ── */
    .main-header {
        padding: 14px 4%;
    }
    .site-logo { height: 50px; }
    #packs, #concept, #clement, #faq {
        scroll-margin-top: 80px;
    }
    /* Sur mobile on cache les boutons texte et le message de bienvenue,
       seuls le panier et le burger restent visibles */
    .header-actions .btn-secondary,
    .header-actions .btn-primary,
    .user-greeting {
        display: none;
    }
    /* Repris dans le menu burger puisqu'ils disparaissent du header ci-dessus */
    .nav-auth-link { display: block; }
    .cart-link {
        width: 38px;
        height: 38px;
    }

    /* ── HERO ── */
    .hero-sub { font-size: 15px; }
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .hero-buttons a { text-align: center; }

    /* ── PACKS ── */
    .packs-section { padding: 50px 4%; }
    .section-title h1 { font-size: 26px; }
    .section-title h2 { font-size: 26px; }
    .packs-container {
        flex-direction: column !important;
        align-items: center;
    }
    .packs-container > div {
        min-width: unset !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* ── CONCEPT ── */
    .concept-section { padding: 50px 4%; }
    .concept-with-devis { flex-direction: column; }
    .concept-with-devis .devis-card { max-width: 100%; }
    .concept-grid {
        flex-direction: column;
        gap: 16px;
    }
    .concept-card { padding: 28px 20px; }

    /* ── FAQ ── */
    .faq-section { padding: 40px 4% 50px; }
    .faq-layout { flex-direction: column; gap: 16px; }
    .faq-categories {
        flex: none;
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
    }
    .faq-category { white-space: nowrap; width: auto; }
    .faq-accordion-question { padding: 15px 16px; font-size: 14px; }
    .faq-accordion-answer p { padding: 0 16px 16px; }

    /* ── PROFIL CLÉMENT ── */
    .profile-section { padding: 50px 4%; }
    .profile-container { flex-direction: column; gap: 24px; }
    .profile-photo { height: 240px; }
    .profile-text h2 { font-size: 24px; }
    .profile-badges {
        flex-direction: column;
        gap: 10px;
    }

    /* ── FOOTER ── */
    .footer-container {
        flex-direction: column;
        gap: 24px;
    }
    .footer-col { min-width: unset; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — PETIT MOBILE (max 480px)
══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .section-title h1 { font-size: 24px; }
    .section-title h2 { font-size: 22px; }
    /* boutons header déjà cachés depuis 768px */
}
