:root {
            --blue-gaulois: #1c3144;
            --yellow-gaulois: #eec13f;
            --light-bg: #ebf2f7;
            --white: #ffffff;
            --gray-text: #6c757d;
            --success: #2d6a4f;
            --nature: #40916c;
            --error: #d90429;
        }

        /* --- RESET & BASE --- */
        * {
            box-sizing: border-box;
        }

        html,
        body {
            margin: 0;
            max-width: 100vw;
            overflow-x: hidden;
            font-family: 'Lato', sans-serif;
            background-color: var(--light-bg);
            color: var(--blue-gaulois);
            line-height: 1.6;
        }

        h1,
        h2,
        h3,
        h4 {
            font-family: 'Poppins', sans-serif;
            margin-top: 0;
        }

        .host-tool-main > .container {
            margin-block: 0;
            padding-block: 0;
        }

        /* --- HEADER & INTRO --- */
        .header {
            text-align: center;
            margin-bottom: 20px;
        }

        .header img {
            max-height: 80px;
            margin-bottom: 15px;
        }

        .intro-section {
            background: var(--white);
            border-radius: 25px;
            padding: 45px;
            margin-bottom: 40px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            text-align: center;
        }

        .intro-section h2 {
            color: var(--blue-gaulois);
            font-size: 2.2rem;
            margin-bottom: 15px;
            line-height: 1.2;
        }

        .intro-section .mission-statement {
            font-size: 1.3rem;
            font-weight: 600;
            max-width: 900px;
            margin: 0 auto 20px;
            line-height: 1.4;
            color: var(--blue-gaulois);
        }

        .intro-section .subtitle {
            font-size: 1.1rem;
            color: var(--gray-text);
            max-width: 850px;
            margin: 0 auto 40px;
        }

        /* --- BENEFICES --- */
        .benefits-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
        }

        .benefit-card {
            background: #f8f9fa;
            padding: 35px 25px;
            border-radius: 20px;
            border-top: 5px solid var(--blue-gaulois);
            text-align: center;
            transition: 0.3s;
        }

        .benefit-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        }

        .benefit-card.guest {
            border-top-color: var(--yellow-gaulois);
        }

        .benefit-card i {
            font-size: 2.5rem;
            margin-bottom: 20px;
            color: var(--blue-gaulois);
        }

        .benefit-card h4 {
            font-size: 1.3rem;
            margin-bottom: 15px;
            color: var(--blue-gaulois);
        }

        .benefit-card p {
            font-size: 0.95rem;
            color: var(--gray-text);
            line-height: 1.5;
        }

        .add-missing {
            font-style: italic;
            font-size: 0.85rem;
            color: var(--blue-gaulois);
            margin-top: 20px;
            font-weight: 600;
            border-top: 1px solid #e0e0e0;
            padding-top: 15px;
            width: 100%;
        }

        /* --- STATS --- */
        .stats-assurance {
            background: var(--blue-gaulois);
            color: white;
            padding: 35px;
            border-radius: 25px;
            margin-bottom: 40px;
            display: flex;
            align-items: center;
            gap: 30px;
        }

        .stats-assurance i {
            font-size: 3.5rem;
            color: var(--yellow-gaulois);
            opacity: 0.8;
        }

        .stats-assurance h3 {
            color: var(--yellow-gaulois);
            margin-bottom: 10px;
        }

        /* --- FORMULAIRE --- */
        .card {
            background: var(--white);
            border-radius: 25px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            margin-bottom: 30px;
        }

        .card-header {
            background-color: var(--blue-gaulois);
            color: white;
            padding: 20px 30px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .card-body {
            padding: 35px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 35px;
        }

        .input-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 20px;
        }

        label {
            font-weight: bold;
            font-size: 0.95rem;
        }

        input,
        select,
        textarea {
            padding: 10px;
            border: 2px solid #e1e8ed;
            border-radius: 12px;
            font-size: 1rem;
            width: 100%;
        }

        input.invalid {
            border-color: var(--error);
            background: #fffafa;
        }

        .gps-status {
            font-size: 0.8rem;
            margin-top: 5px;
            font-weight: bold;
            display: none;
        }

        .gps-status.searching {
            color: var(--blue-gaulois);
            display: block;
        }

        .gps-status.success {
            color: var(--success);
            display: block;
        }

        .gps-status.error {
            color: var(--error);
            display: block;
        }

        .btn-generate {
            background-color: var(--blue-gaulois);
            color: var(--white);
            border: none;
            padding: 22px;
            border-radius: 15px;
            font-size: 1.4rem;
            font-weight: bold;
            cursor: pointer;
            width: 100%;
            margin-top: 10px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            transition: 0.3s;
        }

        /* --- RÉSULTATS --- */
        .results {
            margin-top: 50px;
            display: none;
        }

        .result-block {
            background: white;
            border-radius: 25px;
            padding: 35px;
            margin-bottom: 35px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            border: 2px solid #eee;
        }

        .url-display {
            background: #f8f9fa;
            padding: 15px 25px;
            border-radius: 15px;
            border: 1px dashed var(--blue-gaulois);
            font-family: monospace;
            word-break: break-all;
            font-size: 1rem;
            color: var(--blue-gaulois);
            margin: 15px 0;
            display: block;
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn-action {
            padding: 14px 24px;
            border-radius: 12px;
            font-weight: bold;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            text-decoration: none;
            border: none;
            font-size: 0.95rem;
            transition: 0.2s;
        }

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

        .btn-yellow {
            background: var(--yellow-gaulois);
            color: var(--blue-gaulois);
        }

        .btn-outline {
            background: white;
            border: 2px solid var(--blue-gaulois);
            color: var(--blue-gaulois);
        }

        /* --- INTEGRATION TABS --- */
        .integration-guide {
            background: #fcfcfc;
            border-radius: 20px;
            padding: 30px;
            margin-top: 30px;
            border: 1px solid #ddd;
            display: none;
        }

        .guide-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 25px;
            border-bottom: 1px solid #eee;
            padding-bottom: 15px;
            overflow-x: auto;
        }

        .tab-btn {
            background: #f0f2f5;
            border: none;
            padding: 10px 20px;
            border-radius: 50px;
            cursor: pointer;
            font-weight: bold;
            transition: 0.2s;
            white-space: nowrap;
        }

        .tab-btn.active {
            background: var(--blue-gaulois);
            color: white;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .style-selector-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 15px;
            margin: 20px 0;
        }

        .style-item {
            background: #fff;
            border: 2px solid #eee;
            border-radius: 15px;
            padding: 15px;
            cursor: pointer;
            text-align: center;
            transition: 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            min-height: 100px;
        }

        .style-item.active {
            border-color: var(--blue-gaulois);
            background: #f0f7ff;
        }

        .style-item .style-name {
            font-size: 0.8rem;
            font-weight: bold;
            color: var(--gray-text);
            text-transform: uppercase;
        }

        .code-block {
            background: #272822;
            color: #f8f8f2;
            padding: 15px;
            border-radius: 10px;
            font-family: monospace;
            font-size: 0.85rem;
            position: relative;
            margin: 10px 0;
            overflow-x: auto;
        }

        .code-block span {
            white-space: pre-wrap;
            word-break: break-all;
            display: block;
        }

        .copy-code {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.7rem;
        }

        /* --- PACK PHYSIQUE --- */
        .kit-block {
            background: white;
            border-radius: 25px;
            padding: 40px 35px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            border: 2px solid var(--blue-gaulois);
        }

        .theme-selector {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
            margin: 20px 0;
        }

        .theme-opt {
            padding: 12px 20px;
            border: 2px solid #e1e8ed;
            border-radius: 12px;
            cursor: pointer;
            font-weight: bold;
            text-align: center;
            flex: 1;
            min-width: 120px;
        }

        .theme-opt.active {
            border-color: var(--blue-gaulois);
            background: #f0f7ff;
            color: var(--blue-gaulois);
        }

        .pack-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 40px;
            margin-top: 30px;
            align-items: start;
        }

        @media (min-width: 992px) {
            .pack-grid {
                grid-template-columns: 1.2fr 1fr;
            }
        }

        /* --- PREVIEW (RESPONSIVE) --- */
        .preview-box {
            background: #f8f9fa;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            border-radius: 20px;
            border: 1px solid #eee;
        }

        .preview-label {
            font-weight: bold;
            color: var(--blue-gaulois);
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 1px;
            padding-bottom: 8px;
            width: 100%;
            text-align: center;
        }

        /* Containers qui reservent l'espace, puis JS ajuste height et transform */
        .visual-scaler,
        .card-scaler,
        .qr-only-scaler {
            width: 100%;
            margin: 0 auto;
            position: relative;
            background: #f9f9f9;
            border: 1px solid #ccc;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            /* overflow:hidden;  si tu constates un rognage, retire cette ligne */
        }

        .visual-scaler {
            aspect-ratio: 800 / 1131;
            max-width: 450px;
        }

        .card-scaler {
            aspect-ratio: 520 / 280;
            max-width: 520px;
        }

        .qr-only-scaler {
            aspect-ratio: 1 / 1;
            max-width: 300px;
        }

        /* --- EXPORT (TAilles fixes pour html2canvas) --- */

        /* A4 Poster (800x1131) */
        .poster-a4-final {
            position: absolute;
            top: 0;
            left: 0;
            width: 800px !important;
            height: 1131px !important;
            transform-origin: top left;
            background: white;
            border: 30px solid var(--blue-gaulois);
            padding: 60px 50px !important;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            text-align: center;
            box-sizing: border-box;
            margin: 0 !important;
        }

        .poster-a4-final div,
        .poster-a4-final h2,
        .poster-a4-final p {
            margin-left: auto !important;
            margin-right: auto !important;
        }

        .poster-a4-final h2 {
            font-size: 48px !important;
            margin-bottom: 15px !important;
        }

        .poster-a4-final img {
            height: 130px !important;
            width: auto;
            margin: 15px auto !important;
            display: block;
        }

        /* Themes poster */
        .poster-a4-final.theme-gaulois-dark {
            background-color: var(--blue-gaulois) !important;
            border-color: var(--yellow-gaulois) !important;
            color: white !important;
        }

        .poster-a4-final.theme-nature {
            background-color: #f7fff7 !important;
            border-color: var(--nature) !important;
            color: var(--nature) !important;
        }

        /* Nom établissement sur poster */
        .poster-a4-final .p-etab {
            font-size: 44px !important;
            font-weight: 700 !important;
            color: var(--yellow-gaulois);
            margin: 0 !important;
        }

        /* Instruction poster */
        .poster-a4-final #prev-instr {
            font-size: 28px !important;
            line-height: 1.4 !important;
            max-width: 85% !important;
            margin-top: 10px !important;
        }

        /* QR sur poster */
        #qr-poster {
            width: 400px;
            height: 400px;
            background: white !important;
            padding: 20px !important;
            border-radius: 20px !important;
            border: 1px solid #eee !important;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            margin: 20px auto !important;
        }

        /* Carte (520x280) */
        .card-final {
            width: 520px !important;
            height: 280px !important;
            position: absolute;
            top: 0;
            left: 0;
            transform-origin: top left;
            background: white;
            display: flex;
            align-items: center;
            padding: 20px;
            box-sizing: border-box;
        }

        /* Mascotte */
        .card-mascot {
            height: 50px !important;
            width: auto !important;
            margin-bottom: 10px !important;
            display: block;
        }

        #prev-etab-card {
            font-size: 28px !important;
            font-weight: 600 !important;
            color: var(--blue-gaulois);
            line-height: 1.1;
            margin-bottom: 5px;
        }

        .card-subtitle {
            font-size: 16px !important;
            font-weight: bold;
            color: #555;
        }

        #qr-card {
            width: 140px;
            height: 140px;
            padding: 10px;
            background: white !important;
        }

        /* Themes carte */
        .card-final.theme-gaulois-dark {
            background-color: var(--blue-gaulois) !important;
            border-color: var(--yellow-gaulois) !important;
        }

        .card-final.theme-gaulois-dark #prev-etab-card {
            color: var(--yellow-gaulois) !important;
        }

        .card-final.theme-gaulois-dark .card-subtitle {
            color: white !important;
        }

        .card-final.theme-nature {
            background-color: #f7fff7 !important;
            border-color: var(--nature) !important;
        }

        .card-final.theme-nature .card-subtitle {
            color: var(--nature) !important;
            opacity: 0.8;
        }

        /* QR seul (300x300) */
        .qr-only-final {
            width: 300px !important;
            height: 300px !important;
            position: absolute;
            top: 0;
            left: 0;
            transform-origin: top left;
            background: white;
            display: flex !important;
            justify-content: center;
            align-items: center;
            margin: 0 !important;
        }

        #qr-only {
            width: 300px;
            height: 300px;
        }

        /* Rendu net QR (canvas/img) */
        .qr-frame canvas,
        .qr-frame img,
        .qr-no-frame canvas,
        .qr-no-frame img,
        .qr-only-final canvas,
        .qr-only-final img {
            width: 100% !important;
            height: auto !important;
            image-rendering: pixelated;
            display: block;
        }

        /* --- MOBILE PATCH (bouton inline) --- */
        .demo-btn-inline {
            font-size: 0.75rem;
            pointer-events: none;
            white-space: nowrap;
        }

        /* --- POPUP (petits écrans) --- */
        .warning-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(28, 49, 68, 0.9);
            backdrop-filter: blur(8px);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .warning-content {
            background: white;
            padding: 40px 30px;
            border-radius: 30px;
            max-width: 450px;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
        }

        .warning-content h3 {
            color: var(--blue-gaulois);
            font-size: 1.5rem;
            margin-bottom: 15px;
        }

        .warning-content p {
            color: var(--gray-text);
            margin-bottom: 25px;
            font-size: 1rem;
        }

        @media (max-width: 420px) {
            .warning-overlay {
                display: flex;
            }
        }

        .top-nav {
            width: 100%;
            padding: 15px 20px;
            display: flex;
            justify-content: flex-start;
            background: transparent;
        }

        .btn-back-home {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            color: var(--blue-gaulois);
            font-weight: 600;
            font-size: 0.9rem;
            padding: 8px 15px;
            border-radius: 50px;
            background: white;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            transition: all 0.2s ease;
        }

        .btn-back-home:hover {
            transform: translateX(-3px);
            background: var(--blue-gaulois);
            color: white;
        }

        .btn-back-home i {
            font-size: 0.8rem;
        }

        /* Ajustement pour les petits écrans */
        @media (max-width: 768px) {
            .top-nav {
                padding: 10px;
            }
        }

        /* --- INTÉGRATION AU SITE & HERO HÉBERGEURS --- */
        body {
            background: #edf4f8;
        }

        .host-tool-main {
            padding-bottom: 72px;
        }

        .host-tool-hero {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr);
            gap: 48px;
            align-items: center;
            margin: 22px 0 34px;
            padding: 42px;
            background: var(--white);
            border: 1px solid #dce7ee;
            border-radius: 28px;
            box-shadow: 0 16px 40px rgba(28, 49, 68, .08);
        }

        .host-tool-hero__eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin: 0 0 12px;
            color: #8a6810;
            font-size: .82rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .host-tool-hero h1 {
            margin-bottom: 16px;
            color: var(--blue-gaulois);
            font-size: clamp(2rem, 4vw, 3.35rem);
            line-height: 1.08;
        }

        .host-tool-hero__intro {
            max-width: 650px;
            margin: 0 0 22px;
            color: #52677a;
            font-size: 1.12rem;
        }

        .host-tool-hero__benefits {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 18px;
            margin: 0 0 26px;
            padding: 0;
            list-style: none;
        }

        .host-tool-hero__benefits li {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: var(--blue-gaulois);
            font-size: .93rem;
            font-weight: 700;
        }

        .host-tool-hero__benefits i {
            color: var(--success);
        }

        .host-tool-hero__cta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 14px 22px;
            border-radius: 12px;
            background: var(--blue-gaulois);
            color: white;
            font-weight: 900;
            text-decoration: none;
            box-shadow: 0 8px 20px rgba(28, 49, 68, .18);
        }

        .host-tool-hero__cta:hover {
            background: #294961;
            transform: translateY(-1px);
        }

        .host-tool-hero__visual {
            margin: 0;
        }

        .host-tool-hero__visual img {
            display: block;
            width: 100%;
            aspect-ratio: 16 / 10;
            object-fit: cover;
            border-radius: 20px;
            box-shadow: 0 14px 32px rgba(28, 49, 68, .18);
        }

        .host-tool-hero__visual figcaption {
            margin-top: 10px;
            color: #647789;
            font-size: .82rem;
            text-align: center;
        }

        .tool-steps {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin: 0 0 22px;
        }

        .tool-step {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 14px;
            border: 1px solid #d8e4eb;
            border-radius: 14px;
            background: rgba(255,255,255,.72);
            color: #52677a;
            font-size: .9rem;
            font-weight: 700;
        }

        .tool-step strong {
            display: grid;
            width: 28px;
            height: 28px;
            flex: 0 0 28px;
            place-items: center;
            border-radius: 50%;
            background: var(--blue-gaulois);
            color: white;
        }

        .tool-step.is-active {
            border-color: var(--yellow-gaulois);
            background: #fffaf0;
            color: var(--blue-gaulois);
        }

        .guide-result-preview {
            display: flex;
            gap: 14px;
            margin-top: 26px;
            padding: 18px;
            border: 1px solid #d8e4eb;
            border-radius: 14px;
            background: #f7fafc;
        }

        .guide-result-preview > i {
            display: grid;
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            place-items: center;
            border-radius: 50%;
            background: #fff4cf;
            color: #8a6810;
        }

        .guide-result-preview strong {
            display: block;
            margin-bottom: 5px;
            color: var(--blue-gaulois);
        }

        .guide-result-preview p {
            margin: 0;
            color: #647789;
            font-size: .88rem;
        }

        .card,
        .result-block,
        .kit-block {
            border-radius: 20px;
            box-shadow: 0 12px 34px rgba(28, 49, 68, .08);
        }

        .card-header h3 {
            margin: 0;
        }

        .card-header__title {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .card-header__step {
            display: grid;
            width: 32px;
            height: 32px;
            place-items: center;
            border-radius: 50%;
            background: var(--yellow-gaulois);
            color: var(--blue-gaulois);
            font-weight: 900;
        }

        .form-section-title {
            margin: 0 0 18px;
            color: var(--blue-gaulois);
            font-size: 1rem;
        }

        input:focus,
        select:focus,
        textarea:focus,
        button:focus-visible,
        a:focus-visible {
            outline: 3px solid rgba(238, 193, 63, .65);
            outline-offset: 2px;
        }

        .host-tool-reassurance {
            display: flex;
            justify-content: center;
            gap: 18px;
            flex-wrap: wrap;
            margin: 12px 0 0;
            color: #66798a;
            font-size: .82rem;
            font-weight: 700;
        }

        .result-block__intro,
        .kit-block__intro {
            text-align: center;
        }

        .result-block__intro p,
        .kit-block__intro p {
            color: var(--gray-text);
        }

        .support-customization {
            max-width: 880px;
            margin: 28px auto 34px;
            padding: 24px;
            border: 1px solid #d8e4eb;
            border-radius: 16px;
            background: #f7fafc;
        }

        .support-customization h4 {
            margin: 0 0 20px;
            color: var(--blue-gaulois);
            font-size: 1rem;
        }

        .support-customization__grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0 18px;
        }

        .support-customization__message {
            grid-column: 1 / -1;
        }

        .site-footer {
            margin-top: 0;
        }

        @media (max-width: 850px) {
            .host-tool-hero {
                grid-template-columns: 1fr;
                gap: 28px;
                padding: 28px;
            }

            .host-tool-hero__visual {
                order: -1;
            }

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

        @media (max-width: 560px) {
            .host-tool-main > .container {
                margin-block: 0;
                padding-block: 0;
            }

            .host-tool-hero {
                padding: 22px 18px;
                border-radius: 20px;
            }

            .host-tool-hero h1 {
                font-size: 2rem;
            }

            .host-tool-hero__intro {
                font-size: 1rem;
            }

            .card-header,
            .card-body,
            .result-block,
            .kit-block {
                padding: 22px 18px;
            }

            .card-header {
                align-items: flex-start;
                gap: 12px;
            }

            .action-buttons .btn-action {
                width: 100%;
            }

            .support-customization__grid {
                grid-template-columns: 1fr;
            }

            .support-customization__message {
                grid-column: auto;
            }
        }

/* Galerie de designs */
.kit-theme-config {
    max-width: 980px;
    margin: 30px auto 38px;
}

.kit-theme-config > h4 {
    margin: 0 0 16px;
    color: var(--blue-gaulois);
    text-align: center;
}

.theme-selector-toggle {
    display: none;
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.theme-opt {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    color: var(--blue-gaulois);
    background: #fff;
    border: 2px solid #dce6ec;
    border-radius: 14px;
    font: inherit;
}

.theme-opt:hover {
    border-color: #9fb1bd;
    transform: translateY(-2px);
}

.theme-opt.active {
    position: relative;
    border-color: var(--yellow-gaulois);
    background: #fffaf0;
    box-shadow: 0 0 0 3px rgba(238, 193, 63, .16);
}

.theme-opt.active::after {
    content: "✓";
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: #19724f;
    font-weight: 900;
}

.theme-opt > span:not(.theme-thumb) {
    margin-top: 3px;
    font-weight: 900;
}

.theme-opt > small {
    color: #647789;
    font-size: .75rem;
}

.theme-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    display: block;
    border: 8px solid #1c3144;
    border-radius: 8px;
    background: #fff;
}

.theme-thumb i,
.theme-thumb b,
.theme-thumb em {
    position: absolute;
    left: 50%;
    display: block;
    transform: translateX(-50%);
}

.theme-thumb i {
    top: 14%;
    width: 42%;
    height: 8%;
    border-radius: 99px;
    background: #eec13f;
}

.theme-thumb b {
    top: 36%;
    width: 38%;
    aspect-ratio: 1;
    border: 5px solid white;
    border-radius: 8px;
    background: repeating-linear-gradient(45deg, #1c3144 0 3px, white 3px 6px);
    box-shadow: 0 5px 12px rgba(0,0,0,.18);
}

.theme-thumb em {
    bottom: 10%;
    width: 58%;
    height: 6%;
    border: 2px solid currentColor;
    border-radius: 99px;
}

.theme-thumb--signature {
    color: white;
    background: #1c3144;
    border-color: #eec13f;
}

.theme-thumb--signature i {
    background: #eec13f;
}

.theme-thumb--nature {
    color: #2d6a4f;
    background: #f4fbf5;
    border-color: #40916c;
}

.theme-thumb--nature i {
    background: #8abf91;
}

.theme-thumb--warm {
    color: #713d24;
    background: #fff8ed;
    border-color: #c66a35;
}

.theme-thumb--warm i {
    background: #dc8b4f;
}

/* Retour de copie */
.copy-feedback {
    min-height: 24px;
    margin: 12px 0 0;
    color: #19724f;
    font-size: .9rem;
    font-weight: 800;
    text-align: center;
}

.btn-action.is-copied {
    color: white;
    background: #19724f;
}

.share-button-label {
    max-width: 560px;
    margin: 0 auto 24px;
    padding: 18px;
    border: 1px solid #d8e4eb;
    border-radius: 14px;
    background: white;
}

.share-button-label label,
.share-button-label small {
    display: block;
}

.share-button-label small {
    margin-top: 7px;
    color: #647789;
}

.support-customization__grid > .input-group:first-child {
    grid-column: 1 / -1;
}

/* Composition inspirée du kit avis */
.poster-a4-final {
    position: absolute;
    overflow: hidden;
    justify-content: flex-start;
    gap: 0;
    padding: 56px 55px 48px !important;
    border-width: 26px;
}

.poster-a4-final .poster-brand {
    width: 100%;
    min-height: 150px;
}

.poster-a4-final .poster-brand img {
    width: 280px !important;
    height: auto !important;
    max-height: 125px;
    object-fit: contain;
    margin: 0 auto !important;
}

.poster-heading {
    width: 100%;
    margin-top: 18px !important;
}

.poster-a4-final .poster-heading h2 {
    max-width: 680px;
    margin: 0 auto 10px !important;
    font-size: 45px !important;
    line-height: 1.12;
}

.poster-a4-final .poster-heading > p {
    margin: 0 auto 2px !important;
    font-size: 24px;
}

.poster-a4-final .p-etab {
    max-width: 650px;
    font-size: 38px !important;
    line-height: 1.12;
    text-transform: uppercase;
}

.poster-a4-final #qr-poster {
    width: 350px;
    height: 350px;
    flex: 0 0 350px;
    margin: 35px auto 24px !important;
    padding: 18px !important;
    border-radius: 26px !important;
}

.poster-footer {
    width: 100%;
    margin-top: auto !important;
    padding-bottom: 10px;
}

.poster-a4-final #prev-instr {
    max-width: 610px !important;
    margin: 0 auto 18px !important;
    font-size: 24px !important;
    line-height: 1.3 !important;
}

.poster-label {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 7px 24px;
    border: 4px solid currentColor;
    border-radius: 99px;
    font-size: 18px;
    font-weight: 900;
}

/* L'aperçu utilise désormais exactement le même Canvas que les téléchargements. */
.canvas-preview-shell {
    display: block !important;
    overflow: hidden;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.canvas-preview-shell > canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

#capture-poster > #qr-poster[hidden],
#capture-card > #qr-card[hidden] {
    display: none !important;
}

.poster-a4-final.theme-warm {
    color: #713d24;
    background: #fff8ed !important;
    border-color: #c66a35 !important;
}

.poster-a4-final.theme-warm h2,
.poster-a4-final.theme-warm #prev-instr {
    color: #713d24 !important;
}

.poster-a4-final.theme-warm .p-etab {
    color: #c05d2b !important;
}

.card-final.theme-warm {
    background: #fff8ed !important;
    border-color: #c66a35 !important;
}

.card-final.theme-warm #prev-etab-card,
.card-final.theme-warm .card-subtitle {
    color: #713d24 !important;
}

.poster-a4-final.theme-gaulois-dark .poster-brand img {
    filter: brightness(0) invert(1);
}

.download-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.download-actions .btn-action {
    flex: 1;
}

.card-pdf-choice {
    position: relative;
    flex: 1;
}

.card-pdf-choice > summary {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    list-style: none;
    cursor: pointer;
}

.card-pdf-choice > summary::-webkit-details-marker {
    display: none;
}

.card-pdf-choice__options {
    position: absolute;
    z-index: 15;
    right: 0;
    bottom: calc(100% + 8px);
    left: 0;
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid #d8e4eb;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(28, 49, 68, .18);
}

.card-pdf-choice__options button {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--blue-gaulois);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.card-pdf-choice__options button:hover,
.card-pdf-choice__options button:focus-visible {
    background: #f2f6f8;
}

.card-pdf-choice__options button > i {
    color: var(--yellow-gaulois);
    font-size: 1.15rem;
    text-align: center;
}

.card-pdf-choice__options button > span {
    display: grid;
    gap: 2px;
}

.card-pdf-choice__options small {
    color: #647789;
    font-size: .72rem;
}

.download-secondary {
    padding: 11px 14px;
    color: var(--blue-gaulois);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 850px) {
    .theme-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .card-pdf-choice__options {
        position: fixed;
        right: 14px;
        bottom: 14px;
        left: 14px;
        padding: 10px;
        border-radius: 16px;
        box-shadow: 0 18px 50px rgba(28, 49, 68, .3);
    }

    .card-pdf-choice__options button {
        min-height: 62px;
    }
}

@media (max-width: 560px) {
    .kit-theme-config {
        margin: 22px auto 26px;
    }

    .kit-theme-config > h4 {
        margin-bottom: 10px;
        font-size: 1rem;
    }

    .theme-selector-toggle {
        width: 100%;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 15px;
        color: var(--blue-gaulois);
        background: #fff;
        border: 2px solid #dce6ec;
        border-radius: 12px;
        font: inherit;
        text-align: left;
    }

    .theme-selector-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

    .theme-selector {
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 8px;
    }

    .theme-selector.is-open {
        display: grid;
    }

    .theme-opt {
        min-height: 66px;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 9px;
        padding: 7px;
        text-align: left;
    }

    .theme-thumb {
        width: 44px;
        height: 52px;
        grid-row: 1 / 3;
        border-width: 4px;
        border-radius: 5px;
    }

    .theme-opt > span:not(.theme-thumb) {
        align-self: end;
        margin: 0;
        font-size: .82rem;
        line-height: 1.1;
    }

    .theme-opt > small {
        align-self: start;
        font-size: .66rem;
        line-height: 1.15;
    }

    .theme-opt.active::after {
        top: 5px;
        right: 5px;
        width: 18px;
        height: 18px;
        font-size: .7rem;
    }
}

/* Localisation progressive */
.address-summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #b9decf;
    border-radius: 13px;
    background: #f0faf6;
}

.address-summary[hidden] {
    display: none;
}

.address-summary > i {
    color: #19724f;
    font-size: 1.4rem;
    text-align: center;
}

.address-summary strong,
.address-summary span {
    display: block;
}

.address-summary strong {
    color: #155b40;
}

.address-summary span {
    margin-top: 2px;
    color: #52677a;
    font-size: .84rem;
}

.address-summary button {
    padding: 8px 10px;
    color: var(--blue-gaulois);
    background: transparent;
    border: 0;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}

.address-confirm-zone {
    margin-top: 15px;
    padding: 16px;
    border: 1px solid #d8e4eb;
    border-radius: 13px;
    background: #f7fafc;
}

/* Carte d’accueil */
.card-final {
    overflow: hidden;
    padding: 0 !important;
    background: #fff;
    border: 10px solid var(--blue-gaulois);
}

.card-qr-panel {
    width: 42%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42%;
    background: var(--blue-gaulois);
}

.card-final #qr-card {
    width: 158px;
    height: 158px;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}

.card-guide-copy {
    min-width: 0;
    height: 100%;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 22px 24px;
    text-align: left;
}

.card-final .card-guide-logo {
    width: 150px !important;
    height: auto !important;
    max-height: 52px;
    margin: 0 0 12px !important;
    object-fit: contain;
}

.card-guide-kicker {
    margin-bottom: 3px;
    color: #8a6810;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.card-guide-copy > strong {
    color: var(--blue-gaulois);
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 23px;
    line-height: 1.12;
}

.card-final #prev-etab-card {
    margin-top: 9px;
    color: var(--blue-gaulois);
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1.15;
}

.card-final .card-subtitle {
    margin-top: 5px;
    color: #52677a;
    font-size: 13px !important;
    line-height: 1.25;
}

.card-final.theme-gaulois-dark {
    border-color: var(--yellow-gaulois);
}

.card-final.theme-gaulois-dark .card-qr-panel {
    background: var(--yellow-gaulois);
}

.card-final.theme-gaulois-dark .card-guide-copy {
    background: var(--blue-gaulois);
}

.card-final.theme-gaulois-dark .card-guide-logo {
    filter: brightness(0) invert(1);
}

.card-final.theme-gaulois-dark .card-guide-kicker,
.card-final.theme-gaulois-dark #prev-etab-card {
    color: var(--yellow-gaulois) !important;
}

.card-final.theme-gaulois-dark .card-guide-copy > strong,
.card-final.theme-gaulois-dark .card-subtitle {
    color: #fff !important;
}

.card-final.theme-nature {
    border-color: #40916c;
}

.card-final.theme-nature .card-qr-panel {
    background: #40916c;
}

.card-final.theme-nature .card-guide-kicker {
    color: #2d6a4f;
}

.card-final.theme-nature .card-guide-copy > strong,
.card-final.theme-nature #prev-etab-card {
    color: #24553e !important;
}

.card-final.theme-warm {
    border-color: #c66a35 !important;
}

.card-final.theme-warm .card-qr-panel {
    background: #c66a35;
}

.card-final.theme-warm .card-guide-kicker,
.card-final.theme-warm #prev-etab-card {
    color: #b65328 !important;
}

.card-final.theme-warm .card-guide-copy > strong,
.card-final.theme-warm .card-subtitle {
    color: #713d24 !important;
}

@media (max-width: 560px) {
    .address-summary {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .address-summary button {
        grid-column: 2;
        justify-self: start;
        padding-left: 0;
    }
}
