/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
}

/* HEADER */
header {
    background: #fff;
    border-bottom: none; /* on enlève la grande ligne sous tout le header */
}

/* Ligne du haut : logo centré */
.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 10px;
    border-bottom: 1px solid #e5e5e5;
}

.logo-image {
    height: 52px;
    width: auto;
}

/* NAVIGATION (desktop) */
nav {
    position: relative; /* sert de référence au mega-menu pleine largeur */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    gap: 24px;
    border-bottom: none; /* plus de ligne horizontale sur toute la largeur */
}

.nav-links {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
    align-items: center; /* aligne tous les liens (dont Haute Joaillerie) à la même hauteur */
}

nav a {
    position: relative;
    display: inline-block;
    color: #000;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 400;
    padding-bottom: 8px;
}

/* "Haute Joaillerie" utilise exactement le même alignement vertical que les autres liens */
.nav-link-haute {
    position: static;
}

/* barre noire animée sous les liens */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}

nav a:hover::after {
    transform: scaleX(1);
}

/* Icônes menu droite */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* bouton kebab – caché en desktop */
.nav-more-btn {
    display: none;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* Conteneur loupe + input */
.search-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.header-search-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Barre de recherche cachée par défaut */
.header-search-input {
    width: 0;
    opacity: 0;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 4px 0;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    background: transparent;
    transition: width 0.25s ease, opacity 0.25s ease;
}

/* Au survol ou focus : barre visible */
.search-wrapper:hover .header-search-input,
.header-search-input:focus {
    width: 140px;
    opacity: 1;
}

/* Icône profil */
.header-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* Résultats de recherche */
.search-results {
    position: absolute;
    top: 130%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    min-width: 230px;
    max-width: 280px;
    max-height: 260px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    gap: 8px;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f6f6f6;
}

.search-result-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #f5f5f5;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.search-result-text {
    flex: 1;
}

.search-result-name {
    font-size: 12px;
    color: #111;
    margin-bottom: 2px;
}

.search-result-price {
    font-size: 11px;
    color: #666;
}

.search-empty {
    padding: 8px 10px;
    font-size: 11px;
    color: #999;
}

/* --- MEGA MENU HAUTE JOAILLERIE --- */

.nav-item {
    position: static; /* on ne se base plus sur chaque item, mais sur <nav> pour le mega-menu */
}

/* bande blanche pleine largeur, animée */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;                  /* toute la largeur du site, sans décalage ni scroll horizontal */
    background: #fff;
    border-top: none;
    border-bottom: none;          /* aucune ligne horizontale pleine largeur pour le mega-menu */

    /* animation d'ouverture */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition:
        max-height 0.3s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
    z-index: 900;
}

/* quand le menu est ouvert via la classe JS */
.nav-item-haute.mega-open .mega-menu {
    max-height: 360px;            /* hauteur suffisante pour afficher les cartes + le lien */
    opacity: 1;
    transform: translateY(0);
}

/* contenu centré dans la bande */
.mega-inner {
    max-width: 1200px;
    margin: 8px auto 18px;        /* centré sous le menu principal */
    padding: 0 40px;
}

/* Barre d'onglets (Les dernières collections, Les marqueurs de style, etc.) */
.mega-title {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: left;
    margin-bottom: 12px;
}

.mega-tab {
    position: relative;
    padding-bottom: 6px;
    cursor: pointer;
    white-space: nowrap;
    color: #000;
}

/* Ligne noire fine animée sous les onglets du mega-menu */
.mega-tab::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}

.mega-tab-active::after,
.mega-tab:hover::after {
    transform: scaleX(1);
}

/* grille 4 vignettes un peu plus petites */
.mega-grid {
    /* Centre les cartes comme sur le site officiel */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    margin: 16px auto 10px;
    width: 100%;
}

.mega-card {
    text-align: center;
    text-decoration: none;
    color: #000;
    font-size: 11px;
}

/* vignettes plus petites et centrées */
.mega-card-img-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 2px;
}

.mega-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* "contain" si tu veux tout voir */
    display: block;
    transition: transform 0.25s ease-out;
}

/* Mini zoom très léger au survol des images du mega-menu */
.mega-card:hover .mega-card-img-wrapper img {
    transform: scale(1.03);
}

.mega-card-name {
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mega-see-all {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    position: relative;
}

.mega-see-all::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}

.mega-see-all:hover::after {
    transform: scaleX(1);
}

.mega-see-all-wrapper {
    text-align: center;
    margin-top: 12px;
}

/* Adaptation tablette (<= 1024px) */
@media (max-width: 1024px) {
    nav {
        padding: 14px 24px;
        gap: 16px;
    }

    .nav-links {
        gap: 24px;
    }

    .mega-inner {
        max-width: 100%;
        padding: 0 24px;
    }

    .mega-grid {
        flex-wrap: wrap;
        gap: 24px;
    }

    .mega-card-img-wrapper {
        width: 120px;
        height: 120px;
    }

    .main-content {
        padding: 24px 24px 50px;
    }

    .section-title {
        font-size: 32px;
    }

    .intro-text {
        font-size: 15px;
    }

    .info-row {
        grid-template-columns: 180px 1fr;
    }
}

/* Mobile : on désactive le mega menu */
@media (max-width: 768px) {
    .mega-menu {
        display: none !important;
    }
}

/* HERO */
.hero {
    background: linear-gradient(to bottom, #f8f8f8 0%, #fff 100%);
    padding: 30px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 40px;
}

/* BARRE DE PROGRESSION */
.progress-container {
    display: none;
    max-width: 700px;
    margin: 25px auto 40px;
    padding: 0 20px;
}

.progress-container.visible {
    display: block;
}

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
}

.step.active .step-number {
    background: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

.step.inactive .step-number {
    background: #fff;
    border: 2px solid #ddd;
    color: #999;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 -20px;
    position: relative;
    top: -30px;
    z-index: 1;
    min-width: 100px;
}

.step-line.completed {
    background: #000;
}

/* CONTENU PRINCIPAL */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 40px 60px;
}

/* Titre explicatif compact ("Pourquoi continuer ?") */
.why-title {
    background: #f8f8f8;           /* même fond gris que .security-note */
    border-left: 3px solid #000;   /* ligne noire à gauche */
    padding: 10px 12px;
    margin: 16px 0;
    max-width: 900px;

    font-size: 10px; /* un peu plus grand (8px + 2px) mais toujours discret */
    font-weight: 700;
    line-height: 1.6;
    color: #666;
    text-align: left;
}

/* Note PCI-DSS sous le bouton de validation (page 3) */
.pci-note {
    margin-top: 8px;
    font-size: 10px;
    color: #777;
    max-width: 900px;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 15px;
    color: #000;
}

.section-title-small {
    font-size: 28px;
    margin-top: 10px;
}

.section-subtitle {
    text-align: center;
    color: #999;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.intro-text {
    text-align: center;
    color: #666;
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 35px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* LETTRE (page 1) */
.alert-container {
    max-width: 900px;
    margin: 0 auto 50px;
    font-size: 15px;
    line-height: 1.9;
    color: #333;
}

.alert-greeting {
    margin-bottom: 20px;
}

.alert-paragraph {
    margin-bottom: 15px;
}

.alert-list {
    margin: 15px 0 0 0;
    padding-left: 0;
    list-style: none;
}

.alert-list li {
    margin-bottom: 6px;
}

.alert-list li::before {
    content: "— ";
}

/* INFOS CLIENT */
.info-grid {
    max-width: 900px;
    margin: 0 auto 35px;
}

/* Ligne avatar + nom client au-dessus des infos */
.customer-inline {
    max-width: 900px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
}

.customer-inline-avatar {
    width: 18px;
    height: 18px;
}

.customer-inline-separator {
    font-size: 10px;
}

.customer-inline-name {
    font-size: 11px;
}

.info-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
    align-items: center;
    position: relative;
}

/* Barre noire animée */
.info-row::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}

.info-row:hover::after {
    transform: scaleX(1);
}

.info-row,
.info-row .info-label,
.info-row .info-value {
    user-select: none;
    cursor: default;
}

.info-label {
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #999;
    font-weight: 500;
}

.info-value {
    font-size: 16px;
    color: #000;
}

/* RADIOS */
.radio-section {
    max-width: 900px;
    margin: 40px auto 35px;
}

.radio-question {
    font-size: 16px;
    margin-bottom: 25px;
    color: #333;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 0;
}

.radio-option input[type="radio"] {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #000;
}

.radio-option label {
    font-size: 15px;
    cursor: pointer;
    color: #333;
}

/* LISTE D'ACHATS (page 2) */
.purchase-item {
    display: flex;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #e5e5e5;
    gap: 25px;
}

.purchase-image {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.purchase-details {
    flex: 1;
}

.purchase-date {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.purchase-name {
    font-size: 16px;
    color: #000;
    margin-bottom: 5px;
}

.purchase-price {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-align: right;
}

/* BOUTON CONTINUER */
.btn-container {
    max-width: 900px;
    margin: 40px auto 0;
}

.btn-continue {
    display: block;
    width: 100%;
    background: #e5e5e5;
    color: #999;
    padding: 16px 0;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: not-allowed;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.btn-continue.active {
    background: #000;
    color: #fff;
    cursor: pointer;
}

.btn-continue.active:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Phrase sécurité */
.security-footnote {
    max-width: 900px;
    margin: 25px auto 0;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    font-size: 12px;
    color: #666;
}

/* LOADER */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* FORMULAIRE */
.form-container {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 35px 30px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-label .required {
    color: #c41e3a;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.security-note {
    background: #f8f8f8;
    border-left: 3px solid #000;
    padding: 18px 20px;
    margin: 30px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* FOOTER */
footer {
    background: #f8f8f8;
    border-top: 1px solid #e5e5e5;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 30px;
    font-size: 13px;
    color: #666;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 25px;
}

.footer-column {
    min-width: 180px;
}

.footer-column h4 {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
}

.footer-column a:hover {
    color: #000;
}

.footer-icons-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.footer-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #000;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.footer-bottom {
    border-top: 1px solid #e5e5e5;
    padding-top: 15px;
    font-size: 11px;
    color: #999;
    text-align: left;
}

/* Bloc mentions légales Richemont */
.footer-legal {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #777;
}

.footer-legal-item {
    display: inline-block;
    margin: 0 4px;
    white-space: nowrap;
}

.footer-legal a.footer-legal-item {
    color: #777;
    text-decoration: none;
}

.footer-legal a.footer-legal-item:hover {
    text-decoration: underline;
}

.footer-legal-separator {
    margin: 0 4px;
    color: #b3b3b3;
}

/* OVERLAY LOADER */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.visible {
    display: flex;
}

/* Floute toute la page (sauf l'overlay) quand activé depuis le JS */
body.page-blur > *:not(#global-loading) {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.2s ease;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #ddd;
    border-top-color: #000;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 768px) {

    body {
        font-size: 14px; /* texte un peu plus grand sur mobile */
    }

    nav {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Barre de recherche centrée sur mobile */
    .nav-icons {
        width: 100%;
        justify-content: center;
    }

    .search-wrapper {
        flex: 0 1 auto;
        justify-content: center;
    }

    .header-search-input {
        width: 130px;
        opacity: 1;
    }

    /* Réduit l’espace vertical entre le header (kebab) et le titre "Alerte de sécurité" */
    .hero {
        padding: 12px 16px;
    }

    .hero-inner {
        height: 24px;
    }

    .main-content {
        padding: 16px 16px 36px;
    }

    .section-title {
        margin-bottom: 10px;
    }

    /* liens cachés avec animation */
    .nav-links {
        display: block;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateX(20px);
        transition:
            max-height 0.25s ease-out,
            opacity 0.2s ease-out,
            transform 0.25s ease-out;
        margin-top: 4px;
        order: 2;              /* le menu se place sous la barre de recherche */
        text-align: center;
    }

    nav.menu-open .nav-links {
        max-height: 200px;
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links a {
        display: inline-block;
        font-size: 9px;      /* plus petit pour que tout tienne dans la bande grise */
        margin-right: 10px;
        margin-bottom: 4px;
        line-height: 1.6;
    }

    .nav-icons {
        align-self: flex-end;
        gap: 12px;
        order: 1;              /* les icônes (dont la recherche) restent au-dessus du menu */
    }

    .nav-more-btn {
        display: inline-block;
    }

    .search-results {
        right: auto;
        left: 0;
        max-width: 90vw;
    }

    .mega-menu {
        display: none !important; /* désactivation du mega-menu en mobile */
    }

    .main-content {
        padding: 20px 14px 40px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 11px;
        margin-bottom: 30px;
    }

.info-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .info-label {
        font-size: 12px;
    }

    .info-value {
        font-size: 15px;
    }

    .purchase-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .purchase-price {
        text-align: left;
    }

    .form-container {
        padding: 18px 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .steps {
        gap: 10px;
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .step-line {
        min-width: 50px;
        margin: 0 -10px;
    }

    .footer-columns {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 8px;
    }

    .intro-text {
        font-size: 13px;
    }

    .section-title {
        font-size: 22px;
    }

    .btn-continue {
        font-size: 12px;
        padding: 14px 0;
    }
}