/**
 * Wizard de souscription — Kit de l'Entrepreneur
 *
 * STRATÉGIE :
 * - Hérite des polices et couleurs du thème (Pricom) via font: inherit
 * - Boutons utilisent la classe .button native du thème WordPress
 * - Couleurs uniquement pour les éléments fonctionnels (étapes, erreurs, etc.)
 * - Mobile-first
 */

/* ════════════════════════════════════════════════
   CONTENEUR PRINCIPAL
   ════════════════════════════════════════════════ */
.kite-wizard {
    max-width: 920px;
    margin: 2rem auto;
    padding: 0 1rem;
    font: inherit;
    color: inherit;
}

.kite-wizard *,
.kite-wizard *::before,
.kite-wizard *::after {
    box-sizing: border-box;
}

/* Force l'attribut [hidden] même si le thème (Pricom) le surcharge */
.kite-wizard [hidden] {
    display: none !important;
}

/* ════════════════════════════════════════════════
   BARRE DE PROGRESSION
   ════════════════════════════════════════════════ */
.kite-wizard-progress {
    margin-bottom: 2rem;
}

.kite-wizard-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .25rem;
    counter-reset: kite-step;
}

.kite-step {
    flex: 1;
    text-align: center;
    cursor: default;
    opacity: .45;
    transition: opacity .2s;
    padding: 0 .25rem;
    min-width: 0;
}

.kite-step.is-active,
.kite-step.is-done {
    opacity: 1;
}

.kite-step.is-done {
    cursor: pointer;
}

.kite-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .9rem;
    background: rgba(0, 0, 0, .08);
    color: inherit;
    margin-bottom: .35rem;
}

.kite-step.is-active .kite-step-num {
    background: currentColor;
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .15);
}

.kite-step.is-done .kite-step-num {
    background: #27ae60;
    color: white;
}

.kite-step.is-done .kite-step-num::before {
    content: '✓';
}
.kite-step.is-done .kite-step-num span {
    display: none;
}

.kite-step-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
}

.kite-wizard-progressbar {
    height: 4px;
    background: rgba(0, 0, 0, .08);
    border-radius: 2px;
    overflow: hidden;
}

.kite-wizard-progressbar-fill {
    height: 100%;
    background: currentColor;
    transition: width .4s ease;
    opacity: .85;
}

/* ════════════════════════════════════════════════
   BROUILLON RESTAURÉ
   ════════════════════════════════════════════════ */
.kite-wizard-restored {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #6d4c00;
    padding: .75rem 1rem;
    border-radius: .5rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}

.kite-link {
    background: none;
    border: none;
    color: currentColor;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.kite-link:hover { opacity: .7; }

/* ════════════════════════════════════════════════
   PANNEAU (ÉTAPE)
   ════════════════════════════════════════════════ */
.kite-pane {
    display: none;
    animation: kiteFadeIn .25s ease;
}

.kite-pane.is-active {
    display: block;
}

@keyframes kiteFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.kite-pane-head {
    margin-bottom: 1.5rem;
}

.kite-pane-head h2 {
    margin: 0 0 .5rem 0;
    font-size: 1.5rem;
}

.kite-pane-head p {
    margin: 0;
    opacity: .75;
}

/* ════════════════════════════════════════════════
   ERREURS
   ════════════════════════════════════════════════ */
.kite-step-error,
.kite-submit-error {
    background: #fdecea;
    border: 1px solid #f5b7b1;
    color: #922b21;
    padding: .75rem 1rem;
    border-radius: .5rem;
    margin: 0 0 1rem 0;
    font-size: .9rem;
    font-weight: 600;
}

.kite-submit-success {
    background: #d4edda !important;
    border-color: #a5d6a7 !important;
    color: #155724 !important;
}

.kite-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, .15) !important;
}

.kite-error-msg {
    display: block;
    color: #c0392b;
    font-size: .8rem;
    margin-top: .25rem;
    font-weight: 600;
}

/* ════════════════════════════════════════════════
   ÉTAPE 1 : PACKS
   ════════════════════════════════════════════════ */
.kite-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.kite-pack-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.kite-pack-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kite-pack-inner {
    border: 2px solid rgba(0, 0, 0, .08);
    border-radius: .75rem;
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: all .2s;
    background: rgba(255, 255, 255, .5);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kite-pack-card:hover .kite-pack-inner {
    border-color: rgba(0, 0, 0, .25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.kite-pack-card input:checked + .kite-pack-inner {
    border-color: currentColor;
    background: rgba(0, 0, 0, .03);
    box-shadow: 0 0 0 2px currentColor;
}

.kite-pack-icone {
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

.kite-pack-inner h3 {
    margin: 0 0 .25rem 0;
    font-size: 1.2rem;
}

.kite-pack-sous-titre {
    margin: 0 0 1rem 0;
    font-size: .85rem;
    opacity: .7;
}

.kite-pack-prix {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.kite-pack-prix strong {
    font-size: 1.75rem;
}

.kite-pack-prix span {
    font-size: .8rem;
    opacity: .7;
    margin-left: .25rem;
}

.kite-pack-inclus {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: .85rem;
    flex: 1;
}

.kite-pack-inclus li {
    padding: .25rem 0;
}

.kite-pack-cocher {
    display: none;
    background: #27ae60;
    color: white;
    padding: .35rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: .8rem;
    margin-top: 1rem;
}

.kite-pack-card input:checked + .kite-pack-inner .kite-pack-cocher {
    display: block;
}

/* ════════════════════════════════════════════════
   ÉTAPE 2 : QUIZ + FORMES JURIDIQUES
   ════════════════════════════════════════════════ */
.kite-quiz {
    background: rgba(0, 0, 0, .03);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.kite-quiz summary {
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.kite-quiz-body {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.kite-quiz-question {
    margin-bottom: 1rem;
}

.kite-quiz-question > label {
    display: block;
    font-weight: 600;
    margin-bottom: .35rem;
}

.kite-quiz-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.kite-quiz-options label {
    cursor: pointer;
    font-weight: normal;
}

.kite-quiz-resultat {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
    padding: 1rem;
    border-radius: .5rem;
    margin-top: 1rem;
}

.kite-quiz-resultat strong { display: block; margin-bottom: .25rem; }
.kite-quiz-resultat .button { margin-top: .75rem; }

/* ── Regroupement des formes juridiques par catégorie ── */
.kite-forme-groupe {
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    background: rgba(0, 0, 0, .02);
}

.kite-forme-groupe > summary {
    cursor: pointer;
    padding: .85rem 1rem;
    font-weight: 600;
    font-size: .95rem;
    user-select: none;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kite-forme-groupe > summary::-webkit-details-marker { display: none; }

.kite-forme-groupe > summary::after {
    content: '▼';
    font-size: .7rem;
    opacity: .5;
    transition: transform .2s;
}

.kite-forme-groupe[open] > summary::after {
    transform: rotate(180deg);
}

.kite-forme-groupe > summary:hover {
    background: rgba(0, 0, 0, .03);
    border-radius: .5rem;
}

.kite-formes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: .75rem;
    padding: .75rem 1rem 1rem;
}

.kite-forme-card {
    cursor: pointer;
}

.kite-forme-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kite-forme-inner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 2px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .5);
    transition: all .2s;
}

.kite-forme-card:hover .kite-forme-inner {
    border-color: rgba(0, 0, 0, .25);
}

.kite-forme-card input:checked + .kite-forme-inner {
    border-color: currentColor;
    background: rgba(0, 0, 0, .03);
}

.kite-forme-icone {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kite-forme-inner h4 {
    margin: 0 0 .25rem 0;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
}

.kite-forme-inner h4 small {
    font-size: .7rem;
    font-weight: 400;
    opacity: .65;
    line-height: 1.2;
}

.kite-forme-texte { flex: 1; min-width: 0; }

.kite-forme-inner p {
    margin: 0 0 .35rem 0;
    font-size: .85rem;
    opacity: .75;
}

.kite-forme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .35rem;
}

.kite-tag {
    display: inline-block;
    padding: 2px 7px;
    font-size: .68rem;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1.4;
}

.kite-tag-notaire {
    background: #fef3c7;
    color: #92400e;
}

.kite-tag-capital {
    background: #dbeafe;
    color: #1e40af;
}

.kite-tag-illimitee {
    background: #fee2e2;
    color: #991b1b;
}

.kite-tag-mixte {
    background: #fce7f3;
    color: #9d174d;
}

.kite-info-coop {
    background: #fff8e1;
    border-color: #ffe082;
    color: #6d4c00;
}

.kite-alerte-notaire {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 1rem;
    border-radius: .5rem;
    margin-top: 1.5rem;
}

.kite-alerte-notaire h4 { margin: 0 0 .5rem 0; }
.kite-alerte-notaire p  { margin: 0 0 .5rem 0; }
.kite-alerte-notaire p:last-child { margin-bottom: 0; }

/* ════════════════════════════════════════════════
   CHAMPS DE FORMULAIRE
   ════════════════════════════════════════════════ */
.kite-field {
    margin-bottom: 1.25rem;
}

.kite-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .kite-field-row { grid-template-columns: 1fr; }
}

.kite-field label {
    display: block;
    font-weight: 600;
    margin-bottom: .35rem;
    font-size: .9rem;
}

.kite-field input[type="text"],
.kite-field input[type="email"],
.kite-field input[type="tel"],
.kite-field input[type="number"],
.kite-field textarea,
.kite-field select,
.kite-associe-card input,
.kite-associe-card select {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .35rem;
    font: inherit;
    background: white;
    transition: border-color .15s, box-shadow .15s;
}

.kite-field input:focus,
.kite-field textarea:focus,
.kite-field select:focus,
.kite-associe-card input:focus,
.kite-associe-card select:focus {
    outline: none;
    border-color: currentColor;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.kite-field small {
    display: block;
    margin-top: .25rem;
    font-size: .8rem;
    opacity: .65;
}

/* ════════════════════════════════════════════════
   ÉTAPE 4 : ASSOCIÉS
   ════════════════════════════════════════════════ */
.kite-info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
    padding: .75rem 1rem;
    border-radius: .5rem;
    margin-bottom: 1rem;
}

.kite-info-box p { margin: 0; }

.kite-associe-card {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, .5);
}

.kite-associe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.kite-associe-header h4 { margin: 0; }

.kite-associes-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.kite-associes-compteur {
    opacity: .7;
    font-size: .85rem;
}

/* ════════════════════════════════════════════════
   ÉTAPE 6 : RÉCAPITULATIF
   ════════════════════════════════════════════════ */
.kite-recap {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.kite-recap-section {
    background: rgba(0, 0, 0, .03);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    position: relative;
}

.kite-recap-section h3 {
    margin: 0 0 .5rem 0;
    font-size: 1rem;
}

.kite-recap-content {
    font-size: .95rem;
    line-height: 1.5;
}

.kite-recap-modifier {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: .85rem;
}

.kite-recap-associes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kite-recap-associes-list li {
    padding: .35rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, .08);
}

.kite-recap-associes-list li:last-child { border-bottom: none; }

.kite-recap-notaire {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 1rem 1.25rem;
    border-radius: .5rem;
    margin-top: 1rem;
}

.kite-recap-notaire h4 { margin: 0 0 .5rem 0; }
.kite-recap-notaire p  { margin: 0; }

.kite-recap-connexion {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #5d3a00;
    padding: 1rem 1.25rem;
    border-radius: .5rem;
    margin-top: 1rem;
    text-align: center;
}

.kite-recap-connexion p { margin: 0 0 .75rem 0; }
.kite-recap-connexion .button { margin: 0 .25rem; }

.kite-cgu {
    margin-top: 1.25rem;
    padding: 1rem;
    background: rgba(0, 0, 0, .03);
    border-radius: .5rem;
}

.kite-cgu label {
    display: flex;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
}

.kite-cgu input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════
   NAVIGATION BAS
   ════════════════════════════════════════════════ */
.kite-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
    flex-wrap: wrap;
}

.kite-wizard-nav-info {
    text-align: center;
    font-size: .8rem;
    opacity: .65;
    flex: 1;
}

.kite-saving-status {
    color: #27ae60;
    font-weight: 600;
    animation: kitePulse .3s ease;
}

@keyframes kitePulse {
    0%   { transform: scale(.95); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.kite-wizard-help { display: block; margin-top: .25rem; }

/* ════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .kite-wizard {
        padding: 0 .5rem;
        margin: 1rem auto;
    }
    .kite-wizard-steps {
        gap: .1rem;
    }
    .kite-step-num {
        width: 26px;
        height: 26px;
        font-size: .75rem;
    }
    .kite-step-label {
        font-size: .65rem;
    }
    .kite-pane-head h2 {
        font-size: 1.2rem;
    }
    .kite-pack-inner {
        padding: 1rem;
    }
    .kite-wizard-nav {
        flex-direction: column;
    }
    .kite-wizard-nav .button {
        width: 100%;
    }
    .kite-recap-modifier {
        position: static;
        margin-top: .5rem;
    }
}
