/* Variables des couleurs */
:root {
    --color-primary: #7B002C;
    --color-secondary: #F28A30;
    --color-black: #1B1815;
    --color-background: #F8F2E5;
    --color-text: #1B1815;
    --color-text-light: #5B5148;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    overflow-x: hidden;
}

/* Animation d'entrée */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 1.5rem 2rem;
    background-color: var(--color-background);
    border-bottom: 1px solid #EEEEEE;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-center {
    height: 60px;
    display: flex;
    align-items: center;
}

.logo-center .logo-img {
    height: 100%;
    width: auto;
}

/* Main Content - Style Vitrine */
.main {
    flex: 1;
    background-color: var(--color-background);
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    padding: 0;
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 4rem 2rem;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-black);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 500px;
}

.region-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.region-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    border: 3px solid var(--color-black);
    padding: 2rem 3rem;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-black);
    position: relative;
    overflow: hidden;
}

.region-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 153, 181, 0.1), transparent);
    transition: left 0.5s ease;
}

.region-btn:hover::before {
    left: 100%;
}

.region-btn:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
}

.region-btn:active {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.region-btn i {
    font-size: 2.5rem;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.region-btn:hover i {
    color: white;
    transform: scale(1.1);
}

.region-btn span {
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.waffle-showcase {
    position: relative;
}

.waffle-showcase img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border: 2px solid var(--color-black);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.waffle-showcase:hover img {
    transform: scale(1.05);
}

/* Sélecteur d'unité */
.unit-selector-container {
    text-align: center;
    margin: 15px 0;
}

.unit-selector {
    display: inline-flex;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.unit-btn {
    border: none;
    background: none;
    padding: 8px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.unit-btn.active {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.unit-info {
    color: #666;
    font-size: 0.85em;
    margin-top: 5px;
}

@media (max-width: 1024px) {
    .header {
        padding: 1.2rem;
    }

    .logo-center {
        height: 55px;
    }

    .hero {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    .hero-content {
        order: 2;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.2rem;
        max-width: none;
        margin: 0 auto 2rem;
    }

    .region-buttons {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        margin-top: 2rem;
    }

    .region-btn {
        width: 100%;
        max-width: 300px;
        padding: 1.5rem 2rem;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 2rem;
    }

    .waffle-showcase img {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .logo-center {
        height: 50px;
    }

    .hero {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .region-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .region-btn {
        width: 100%;
        max-width: 300px;
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }

    .region-btn i {
        font-size: 2rem;
    }

    .waffle-showcase img {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .region-btn {
        padding: 1.2rem 1.5rem;
        font-size: 0.95rem;
        min-width: 180px;
    }

    .region-btn i {
        font-size: 1.8rem;
    }

    .waffle-showcase img {
        width: 220px;
        height: 220px;
    }
}

/* ==========================================================
   DA WAFFLE — crème / orange / rose / bordeaux
   Kensington (titres, capitales) + Poppins (texte)
   ========================================================== */
:root {
    --wf-cream: #F8F2E5;
    --wf-cream-dark: #F0E4CC;
    --wf-ink: #1B1815;
    --wf-orange: #F28A30;
    --wf-honey: #FFB736;
    --wf-pink: #E599B5;
    --wf-pink-pale: #F2CBDA;
    --wf-burgundy: #7B002C;
    --wf-card: #FFFCF5;
    --wf-shadow: 0 14px 32px -20px rgba(27, 24, 21, .45);
    --wf-serif: kensington, Georgia, serif;
}

body {
    background-color: var(--wf-cream);
    background-image: none;
    color: var(--wf-ink);
    -webkit-font-smoothing: antialiased;
}

/* Titres : Kensington, capitales, gras */
h1, h2, h3,
.dashboard-header h1,
.hero-title,
.waffle-info h3,
.category h3,
.popup-header h3 {
    font-family: var(--wf-serif);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.1;
}

.total-value, .sugar-value, .result-value {
    font-family: var(--wf-serif);
    font-weight: 700;
    color: var(--wf-burgundy);
}

/* Header */
.dashboard-header, .header {
    background: rgba(248, 242, 229, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 0;
    box-shadow: 0 6px 24px -16px rgba(27, 24, 21, .5);
}

/* Boutons : pilules capitales */
.back-btn, .reset-btn, .share-btn, .primary-action, .region-btn {
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
    box-shadow: none;
}
.back-btn, .reset-btn, .share-btn {
    border: 2px solid var(--wf-ink);
    background: transparent;
    color: var(--wf-ink);
}
.back-btn:hover, .reset-btn:hover {
    background: var(--wf-ink);
    color: var(--wf-cream);
}
.share-btn:hover, .share-btn:hover i {
    background: var(--wf-orange);
    border-color: var(--wf-orange);
    color: var(--wf-ink);
}
.primary-action {
    background: var(--wf-ink);
    color: var(--wf-cream);
}
.primary-action:hover {
    background: var(--wf-orange);
    color: var(--wf-ink);
    box-shadow: none;
}

/* Cartes & panneaux */
.waffle-card, .waffle-detail, .inputs-section, .results-section,
.topping-item, .result-group, .result-card, .sugar-total,
.sugar-breakdown, .sugar-base-large, .unit-selector-container {
    background: var(--wf-card);
    border: 0;
    border-radius: 22px;
    box-shadow: var(--wf-shadow);
}
.waffle-card { overflow: hidden; }
.waffle-card:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -20px rgba(27, 24, 21, .5); }
.waffle-card.selected, .topping-item.selected {
    background: var(--wf-pink-pale);
    box-shadow: inset 0 0 0 2px var(--wf-pink), var(--wf-shadow);
}
.topping-item:hover { background: var(--wf-cream-dark); }
.result-group { background: var(--wf-cream-dark); box-shadow: none; padding: 1.2rem; }
.result-card { background: transparent; box-shadow: none; }
.sugar-total, .sugar-base-large { background: var(--wf-cream-dark); box-shadow: none; }
.sugar-breakdown { background: var(--wf-cream-dark); box-shadow: none; }
.breakdown-item:last-child { border-top: 2px solid var(--wf-pink); }

/* Pastilles & valeurs */
.sugar-base {
    background: var(--wf-burgundy);
    color: var(--wf-cream);
    border-radius: 999px;
    padding: .3rem .9rem;
}
.result-value {
    background: var(--wf-cream);
    border: 0;
    border-radius: 999px;
    padding: .4rem 1.1rem;
}
.category h3, .inputs-section h3, .results-section h3 {
    border-bottom: 3px solid var(--wf-pink);
    color: var(--wf-ink);
}

/* Champs */
.input-group input[type="number"], input[type="text"], input[type="password"], select {
    border: 2px solid var(--wf-ink);
    border-radius: 14px;
    background: #fff;
    font-family: 'Poppins', sans-serif;
}
.input-group input[type="number"]:focus, input[type="text"]:focus, input[type="password"]:focus, select:focus {
    outline: none;
    border-color: var(--wf-orange);
    box-shadow: 0 0 0 4px rgba(242, 138, 48, .25);
}
.radio-option { border-radius: 14px; }
.radio-option:hover { background: var(--wf-cream-dark); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--wf-burgundy); }

/* Sélecteur d'unité */
.unit-selector { background: var(--wf-cream-dark); border: 0; border-radius: 999px; box-shadow: none; padding: 4px; }
.unit-btn { border-radius: 999px !important; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.unit-btn:not(.active):hover { color: var(--wf-burgundy); background: rgba(229, 153, 181, .25); }
.unit-btn.active { background: var(--wf-burgundy); color: var(--wf-cream); box-shadow: none; transform: none; }
.unit-info { background: var(--wf-cream-dark); border: 0; border-radius: 999px; }
.unit-info strong { color: var(--wf-burgundy); }

/* Popup */
.trial-popup { background: var(--wf-card); border-radius: 28px; }
.popup-header { background: var(--wf-burgundy); color: var(--wf-cream); }
.popup-header::after { display: none; }
.popup-header i { color: var(--wf-honey); }
.popup-content p, .contact-info p { color: var(--wf-ink); }
.contact-info { background: var(--wf-pink-pale); border: 0; border-radius: 18px; }
.contact-info i { background: var(--wf-cream); color: var(--wf-burgundy); }
.contact-info a { color: var(--wf-burgundy); }
.contact-info a::after { background: var(--wf-orange); }

/* Alerte */
.error-alert { background: var(--wf-pink-pale); border: 2px solid var(--wf-burgundy); border-radius: 18px; box-shadow: none; }
.error-alert::before { background: var(--wf-orange); }
.error-alert-content i, .error-alert-content span, .error-close-btn { color: var(--wf-burgundy); }

/* Liens */
a:hover { color: var(--wf-orange); }
:focus-visible { outline: 3px solid var(--wf-orange); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --- Accueil : hero façon WAFFLE --- */
.main { background-color: var(--wf-cream); background-image: none; }
.hero-title {
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    color: var(--wf-burgundy);
    margin-bottom: 1rem;
}
.region-btn {
    background: var(--wf-card);
    border: 0;
    border-radius: 28px;
    box-shadow: var(--wf-shadow);
    color: var(--wf-ink);
}
.region-btn::before { display: none; }
.region-btn i { color: var(--wf-orange); }
.region-btn span { font-family: var(--wf-serif); font-weight: 700; letter-spacing: .06em; }
.region-btn:hover { background: var(--wf-orange); color: var(--wf-ink); border-color: transparent; box-shadow: var(--wf-shadow); }
.region-btn:hover i { color: var(--wf-ink); }
.waffle-showcase img {
    border: 0;
    border-radius: 999px;
    box-shadow: var(--wf-shadow);
    outline: 10px solid var(--wf-pink);
    outline-offset: -2px;
}
.unit-btn.active { background: var(--wf-burgundy); }
button, input, select, textarea { font-family: 'Poppins', sans-serif; }

/* Gaufre détourée (visuel du site WAFFLE) */
.waffle-showcase img {
    width: min(420px, 80vw);
    height: auto;
    object-fit: contain;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    filter: drop-shadow(0 24px 28px rgba(27, 24, 21, .28));
    animation: wfBob 6s ease-in-out infinite;
}
@keyframes wfBob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3%) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .waffle-showcase img { animation: none; } }


/* ==========================================================
   ACCUEIL — hero façon WAFFLE
   ========================================================== */
body.home { background: var(--wf-cream); opacity: 1; animation: none; }
.home .page-wrapper { min-height: 100vh; }

.home-hdr { position: absolute; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(18px, 4vw, 56px); }
.home-logo .logo-img { height: 45px; width: auto; display: block; filter: brightness(0) invert(1); }
.home-link { text-decoration: none; font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wf-ink); padding: .55rem 1.1rem; border: 2px solid var(--wf-ink); border-radius: 999px; transition: background .2s, color .2s; }
.home-link:hover { background: var(--wf-ink); color: var(--wf-cream); }

.home-hero { position: relative; min-height: 100svh; background: var(--wf-honey); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 110px 20px 40px; text-align: center; }
.home-title { margin: 0; display: block; font-family: var(--wf-serif); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: .86; color: var(--wf-cream); font-size: clamp(3.4rem, 19vw, 13rem); position: relative; z-index: 1; }
.home-title span { display: block; }
.home-stage { position: relative; display: inline-block; max-width: 100%; }
.home-waffle { position: absolute; right: -17%; bottom: -16%; width: 28%; height: auto; z-index: 2; transform: rotate(-4deg); filter: drop-shadow(0 30px 34px rgba(27, 24, 21, .3)); animation: homeBob 6s ease-in-out infinite; pointer-events: none; }
@keyframes homeBob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-5%) rotate(6deg); } }
.home-bottom { position: relative; z-index: 3; margin-top: clamp(28px, 6vh, 64px); display: flex; flex-direction: column; align-items: center; gap: 20px; }
.home-sub { margin: 0; max-width: 40ch; font-size: clamp(.95rem, 1.4vw, 1.1rem); line-height: 1.55; color: var(--wf-ink); }
.home-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.home-btn { display: inline-flex; align-items: center; gap: .6rem; padding: 1rem 2rem; border: 0; border-radius: 999px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wf-ink); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s; }
.home-btn--pink { background: var(--wf-pink); }
.home-btn--cream { background: var(--wf-cream); }
.home-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 24px -14px rgba(27, 24, 21, .6); }
.home-btn:hover { background: var(--wf-ink); color: var(--wf-cream); }

.home-ticker { background: var(--wf-ink); color: var(--wf-cream); overflow: hidden; padding: 16px 0; }
.home-ticker__track { display: flex; align-items: center; gap: 36px; width: max-content; animation: homeTicker 32s linear infinite; }
.home-ticker:hover .home-ticker__track { animation-play-state: paused; }
.home-ticker span { font-family: var(--wf-serif); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(22px, 2.6vw, 38px); white-space: nowrap; }
.home-ticker img { height: 34px; width: auto; filter: brightness(0) saturate(100%) invert(74%) sepia(45%) saturate(760%) hue-rotate(348deg) brightness(103%) contrast(93%); }
@keyframes homeTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.home-types { max-width: 1200px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 40px); text-align: center; }
.home-types h2 { margin: 0 0 clamp(24px, 4vw, 44px); font-family: var(--wf-serif); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--wf-burgundy); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; }
.home-types__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; text-align: left; }
.home-type { background: var(--wf-card); border-radius: 26px; overflow: hidden; box-shadow: var(--wf-shadow); transition: transform .25s ease; }
.home-type:hover { transform: translateY(-6px); }
.home-type__img { height: 220px; background-size: cover; background-position: center; }
.home-type__body { background: var(--tc); padding: 20px 24px 24px; }
.home-type__body h3 { margin: 0 0 6px; font-size: 1.6rem; color: var(--wf-ink); }
.home-type__body p { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--wf-ink); }
.home-types__hint { margin: 32px 0 0; font-size: .9rem; color: var(--wf-text-light, #5B5148); }

.home-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px clamp(18px, 4vw, 56px); background: var(--wf-cream-dark); }
.home-footer .logo-img { height: 34px; width: auto; }
.home-footer a { color: var(--wf-ink); text-decoration: none; font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }

@media (max-width: 640px) {
    .home-btn { padding: .9rem 1.5rem; }
    .home-hero { padding-top: 96px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-waffle, .home-ticker__track { animation: none; }
}

/* Bandeau : boucle continue sans coupure (2 groupes identiques, défilement de -50 %) */
.home-ticker__track { display: flex; gap: 0; width: max-content; }
.home-ticker__group { display: flex; align-items: center; flex: none; }
.home-ticker__group span { padding-right: 36px; }
.home-ticker__group img { margin-right: 36px; }
.home-ticker span { color: inherit; }
.home-footer { justify-content: center; }
.home-hdr { justify-content: flex-start; }

/* Pied de page : contact + crédit */
.home-footer { flex-direction: column; align-items: stretch; gap: 20px; padding: 32px clamp(18px, 4vw, 56px) 20px; }
.home-footer__main { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.home-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-style: normal; font-size: .9rem; }
.home-contact strong { font-family: var(--wf-serif); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1.1rem; }
.home-contact a { color: var(--wf-ink); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .9rem; }
.home-contact a:hover, .home-footer__credit a:hover { color: var(--wf-burgundy); }
.home-contact i { color: var(--wf-burgundy); margin-right: 6px; }
.home-footer__credit { margin: 0; padding-top: 16px; border-top: 1px solid rgba(27, 24, 21, .15); text-align: center; font-size: .82rem; color: var(--wf-text-light, #5B5148); }
.home-footer__credit a { color: var(--wf-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .home-footer__main { flex-direction: column; align-items: flex-start; } }

.home-footer .home-footer__credit a { text-transform: none; letter-spacing: 0; font-size: inherit; }
