/* ==========================================================
   Campus 29 SIS v0.4 - Application autonome
   Ce fichier CSS contrôle 100% de l'apparence de la page.
   Il n'hérite d'AUCUN style du thème WordPress.
   ========================================================== */

:root {
    --c29-primary: #1E3A8A;
    --c29-primary-dark: #16296b;
    --c29-accent: #F97316;
    --c29-gray-dark: #1F2937;
    --c29-gray-text: #64748B;
    --c29-gray-light: #F8FAFC;
    --c29-white: #FFFFFF;
    --c29-border: #E2E8F0;
    --c29-success: #16A34A;
    --c29-warning: #F59E0B;
    --c29-error: #EF4444;
}

/* Reset : on repart de zéro, sans hériter du thème */
.c29-app-body {
    margin: 0;
    padding: 0;
    background: var(--c29-gray-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--c29-gray-text);
    line-height: 1.6;
}

#c29-app * {
    box-sizing: border-box;
}

#c29-app img {
    max-width: 100%;
}

/* ============ NAVBAR ============ */

.c29-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    /* v0.17.0 : effet "verre dépoli" (liquid glass), inspiré de PERISCOPE CRM —
       la barre reste lisible par transparence sur le contenu qui défile en
       dessous, plutôt qu'un aplat blanc opaque. */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
}

.c29-navbar-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--c29-primary);
    text-decoration: none;
}

.c29-navbar-links a {
    margin-left: 25px;
    color: var(--c29-gray-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.c29-navbar-links a:hover {
    color: var(--c29-accent);
}

/* ============ GESTION DES VUES (SPA) ============ */

.c29-view {
    display: none;
}

.c29-view.c29-view-active {
    display: block;
}

/* ============ LANDING ============ */

.c29-hero {
    background: linear-gradient(135deg, var(--c29-primary) 0%, var(--c29-primary-dark) 100%);
    color: var(--c29-white);
    padding: 120px 40px;
    text-align: center;
}

.c29-hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    margin: 0 0 10px;
}

.c29-hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px;
    opacity: 0.95;
}

.c29-hero-desc {
    font-size: 16px;
    margin: 0 0 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.c29-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 40px;
    background: var(--c29-white);
    border-bottom: 1px solid var(--c29-border);
    text-align: center;
}

.c29-stat-number {
    font-size: 42px;
    font-weight: 900;
    color: var(--c29-primary);
    margin-bottom: 10px;
}

.c29-stat-label {
    font-size: 13px;
    color: var(--c29-gray-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.c29-features {
    padding: 80px 40px;
    background: var(--c29-white);
}

.c29-features h2 {
    font-size: 32px;
    color: var(--c29-gray-dark);
    text-align: center;
    margin: 0 0 50px;
    font-weight: 700;
}

.c29-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.c29-feature {
    padding: 30px;
    background: var(--c29-gray-light);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.c29-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.c29-feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.c29-feature h3 {
    font-size: 18px;
    color: var(--c29-gray-dark);
    margin: 0 0 10px;
    font-weight: 600;
}

.c29-feature p {
    font-size: 14px;
    margin: 0;
}

.c29-cta {
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--c29-primary) 0%, var(--c29-primary-dark) 100%);
    color: var(--c29-white);
    text-align: center;
}

.c29-cta h2 {
    font-size: 36px;
    margin: 0 0 10px;
    font-weight: 700;
}

.c29-cta p {
    font-size: 16px;
    margin: 0 0 30px;
    opacity: 0.9;
}

/* ============ BOUTONS ============ */

.c29-btn {
    /* v0.17.0 : boutons "façon iOS" (pilule, sans majuscules forcées, moins
       massifs) plutôt que les boutons rectangulaires très contrastés de
       départ — inspiré du style de PERISCOPE CRM. */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.c29-btn-primary {
    background: var(--c29-accent);
    color: var(--c29-white);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.c29-btn-primary:hover {
    background: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.4);
    color: var(--c29-white);
}

.c29-btn-secondary {
    background: rgba(30, 58, 138, 0.08);
    color: var(--c29-primary);
    border: 1px solid rgba(30, 58, 138, 0.18);
}

.c29-btn-secondary:hover {
    background: var(--c29-primary);
    color: var(--c29-white);
    transform: translateY(-1px);
}

.c29-btn-secondary-light {
    background: var(--c29-white);
    color: var(--c29-primary);
}

.c29-btn-secondary-light:hover {
    background: var(--c29-gray-light);
}

.c29-btn-lg {
    padding: 16px 40px;
    font-size: 16px;
}

/* ============ SÉLECTION ÉCOLES ============ */

.c29-selection {
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.c29-selection-header {
    text-align: center;
    margin-bottom: 60px;
}

.c29-selection-header h1 {
    font-size: 36px;
    color: var(--c29-gray-dark);
    margin: 0 0 10px;
    font-weight: 700;
}

.c29-selection-header p {
    font-size: 16px;
    margin: 0;
}

.c29-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.c29-ecole-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-top: 4px solid var(--c29-primary);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
    transition: all 0.25s ease;
}

.c29-ecole-card:hover {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    transform: translateY(-4px);
}

.c29-card-header {
    padding: 25px;
    border-bottom: 1px solid var(--c29-border);
}

.c29-card-header h3 {
    font-size: 18px;
    margin: 0 0 5px;
    font-weight: 600;
}

.c29-card-code {
    font-size: 12px;
    margin: 0;
    text-transform: uppercase;
}

.c29-card-body {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.c29-effectif {
    font-size: 18px;
    font-weight: 600;
    color: var(--c29-gray-dark);
}

.c29-consolidated-promo {
    padding: 40px;
    background: var(--c29-primary);
    color: var(--c29-white);
    border-radius: 12px;
    text-align: center;
}

.c29-consolidated-promo h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
}

.c29-consolidated-promo p {
    margin: 0 0 20px;
    opacity: 0.9;
}

/* ============ DASHBOARD ÉCOLE ============ */

.c29-ecole-dashboard {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.c29-ecole-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--c29-border);
}

.c29-ecole-header h1 {
    font-size: 32px;
    margin: 0 0 5px;
    font-weight: 700;
}

.c29-header-code {
    font-size: 12px;
    margin: 0;
    text-transform: uppercase;
}

.c29-ecole-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.c29-stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.7);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
}

.c29-stat-value {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 8px;
}

.c29-stat-card .c29-stat-label {
    font-size: 12px;
    text-transform: uppercase;
}

.c29-stat-total .c29-stat-value { color: var(--c29-primary); }
.c29-stat-paye .c29-stat-value { color: var(--c29-success); }
.c29-stat-retard .c29-stat-value { color: var(--c29-warning); }
.c29-stat-impaye .c29-stat-value { color: var(--c29-error); }

.c29-ecole-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

.c29-eleves-section,
.c29-sidebar {
    background: var(--c29-white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.c29-eleves-section h2,
.c29-sidebar h2 {
    font-size: 18px;
    color: var(--c29-gray-dark);
    margin: 0 0 20px;
    font-weight: 600;
}

.c29-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.c29-table thead {
    background: var(--c29-gray-light);
}

.c29-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--c29-gray-dark);
    border-bottom: 2px solid var(--c29-border);
}

.c29-table td {
    padding: 12px;
    border-bottom: 1px solid var(--c29-border);
}

.c29-table tbody tr:hover {
    background: var(--c29-gray-light);
}

.c29-sidebar p {
    font-size: 13px;
    margin: 0 0 15px;
}

.c29-sidebar strong {
    color: var(--c29-gray-dark);
}

.c29-actions {
    display: flex;
    gap: 15px;
}

/* ============ VUE CONSOLIDÉE ============ */

.c29-consolidated-view {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.c29-consolidated-header {
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--c29-border);
}

.c29-consolidated-header h1 {
    font-size: 32px;
    color: var(--c29-gray-dark);
    font-weight: 700;
    margin: 0 0 5px;
}

.c29-consolidated-header p {
    margin: 0;
    font-size: 14px;
}

.c29-consolidated-header .c29-back-btn {
    position: absolute;
    top: 0;
    right: 0;
}

.c29-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.c29-card {
    background: var(--c29-white);
    border-radius: 10px;
    padding: 25px;
    display: flex;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.c29-card-icon {
    font-size: 36px;
}

.c29-card-info h3 {
    font-size: 12px;
    text-transform: uppercase;
    margin: 0 0 8px;
    font-weight: 600;
}

.c29-card-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--c29-primary);
    margin: 0;
}

.c29-card-total { border-left: 4px solid var(--c29-primary); }
.c29-card-paye { border-left: 4px solid var(--c29-success); }
.c29-card-retard { border-left: 4px solid var(--c29-warning); }
.c29-card-impaye { border-left: 4px solid var(--c29-error); }

.c29-ecoles-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.c29-ecole-overview {
    background: var(--c29-white);
    border-top: 5px solid var(--c29-primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.c29-overview-header {
    padding: 20px;
    border-bottom: 1px solid var(--c29-border);
}

.c29-overview-header h3 {
    font-size: 16px;
    margin: 0 0 3px;
    font-weight: 600;
}

.c29-code {
    font-size: 11px;
    text-transform: uppercase;
}

.c29-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--c29-border);
    padding: 1px;
}

.c29-overview-item {
    background: var(--c29-white);
    padding: 15px;
    text-align: center;
}

.c29-overview-item .c29-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.c29-overview-item .c29-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.c29-value.c29-paye { color: var(--c29-success); }
.c29-value.c29-retard { color: var(--c29-warning); }
.c29-value.c29-impaye { color: var(--c29-error); }

/* ============ CHARGEMENT ============ */

.c29-loading {
    text-align: center;
    padding: 60px 20px;
    background: var(--c29-white);
    border-radius: 10px;
}

.c29-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--c29-gray-light);
    border-top: 4px solid var(--c29-primary);
    border-radius: 50%;
    animation: c29-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes c29-spin {
    to { transform: rotate(360deg); }
}

/* ============ FORMULAIRES (INSCRIPTION / PAIEMENT) ============ */

.c29-form-page {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.c29-form-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--c29-border);
}

.c29-form-header h1 {
    font-size: 26px;
    margin: 0 0 5px;
    font-weight: 700;
}

.c29-form-header p {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
}

/* v0.16.0 : ligne d'en-tête avec le titre à gauche et un bouton d'action
   (ex : "🧾 Reçu" sur la page paiement) aligné à droite. */
.c29-form-header-ligne {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.c29-form-header-ligne .c29-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.c29-form-header-ligne .c29-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.c29-form {
    background: var(--c29-white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.c29-form-row {
    margin-bottom: 20px;
}

.c29-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--c29-gray-dark);
    margin-bottom: 6px;
}

.c29-form-row input,
.c29-form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c29-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--c29-gray-dark);
    background: var(--c29-white);
}

.c29-form-row input:focus,
.c29-form-row select:focus {
    outline: none;
    border-color: var(--c29-primary);
}

.c29-form-row small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--c29-gray-text);
}

.c29-form-separator {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c29-primary);
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c29-border);
}

.c29-montant-calcule {
    padding: 12px 15px;
    background: var(--c29-gray-light);
    border: 1px dashed var(--c29-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--c29-gray-text);
}

/* ---- Phase C.2 : Responsables, Adresse, Urgence ---- */

.c29-form-hint {
    font-size: 13px;
    color: var(--c29-gray-text);
    margin: -10px 0 15px;
}

.c29-responsable-card {
    background: var(--c29-gray-light);
    border: 1px solid var(--c29-border);
    border-radius: 8px;
    padding: 18px 18px 4px;
    margin-bottom: 20px;
}

.c29-responsable-titre {
    font-size: 15px;
    font-weight: 700;
    color: var(--c29-gray-dark);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.c29-badge-obligatoire,
.c29-badge-facultatif {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 20px;
}

.c29-badge-obligatoire {
    background: #fdecea;
    color: var(--c29-error);
}

.c29-badge-facultatif {
    background: #eaf3ff;
    color: var(--c29-primary);
}

.c29-checkboxes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.c29-checkbox-inline {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600 !important;
    color: var(--c29-gray-dark);
    cursor: pointer;
    margin-bottom: 0 !important;
}

.c29-checkbox-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.c29-montant-calcule.c29-montant-pret {
    background: #eaf3ff;
    border: 1px solid var(--c29-primary);
    color: var(--c29-primary);
    font-weight: 700;
    font-size: 18px;
}

.c29-montant-calcule.c29-montant-erreur {
    background: #fdecea;
    border: 1px solid var(--c29-error);
    color: var(--c29-error);
    font-weight: 600;
}

.c29-form-message {
    margin-bottom: 15px;
    padding: 0;
    font-size: 14px;
}

.c29-form-message.c29-msg-success {
    padding: 12px 15px;
    background: #d5f4e6;
    color: var(--c29-success);
    border-radius: 6px;
}

.c29-repartition-list {
    margin: 8px 0 0;
    padding-left: 20px;
}

.c29-repartition-list li {
    margin-bottom: 4px;
}

.c29-form-message.c29-msg-error {
    padding: 12px 15px;
    background: #fdecea;
    color: var(--c29-error);
    border-radius: 6px;
}

.c29-form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.c29-form-actions button {
    border: none;
    font-family: inherit;
}

/* ============ ÉTAT DE LA SCOLARITÉ (formulaire de paiement) ============ */

.c29-eleve-etat {
    margin-bottom: 20px;
}

.c29-eleve-etat h3 {
    font-size: 15px;
    color: var(--c29-gray-dark);
    margin: 0 0 12px;
    font-weight: 600;
}

.c29-eleve-etat .c29-table {
    background: var(--c29-white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.c29-eleve-etat .c29-table th,
.c29-eleve-etat .c29-table td {
    font-size: 13px;
}

.c29-etat-loading {
    font-size: 13px;
    color: var(--c29-gray-text);
    font-style: italic;
}

.c29-inscription-summary {
    text-align: center;
    font-size: 13px;
    color: var(--c29-gray-text);
    background: var(--c29-white);
    padding: 12px;
    border-radius: 8px;
    margin: 0 0 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.c29-inscription-line {
    font-size: 13px;
    background: var(--c29-gray-light);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.c29-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.c29-badge-paye {
    background: #d5f4e6;
    color: var(--c29-success);
}

.c29-badge-retard {
    background: #fef3c7;
    color: var(--c29-warning);
}

.c29-badge-impaye {
    background: #fdecea;
    color: var(--c29-error);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1200px) {
    .c29-features-grid { grid-template-columns: repeat(2, 1fr); }
    .c29-selection-grid { grid-template-columns: 1fr; }
    .c29-ecoles-overview { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .c29-navbar { padding: 15px 20px; flex-direction: column; gap: 10px; }
    .c29-hero { padding: 60px 20px; }
    .c29-hero-content h1 { font-size: 32px; }
    .c29-stats { grid-template-columns: repeat(2, 1fr); padding: 40px 20px; gap: 20px; }
    .c29-features-grid { grid-template-columns: 1fr; }
    .c29-selection { padding: 30px 20px; }
    .c29-ecole-stats { grid-template-columns: repeat(2, 1fr); }
    .c29-ecole-main { grid-template-columns: 1fr; }
    .c29-summary-cards { grid-template-columns: repeat(2, 1fr); }
    .c29-consolidated-header .c29-back-btn { position: static; display: inline-block; margin-bottom: 15px; }
}

/* ============ v0.15.0 : WIZARD D'INSCRIPTION ============ */

.c29-wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 0 30px;
    position: relative;
}

.c29-wizard-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    text-align: center;
}

/* Ligne reliant les cercles entre eux, dessinée derrière chaque étape sauf la première */
.c29-wizard-progress-step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 17px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--c29-border);
    z-index: 0;
}

.c29-wizard-progress-step.is-fait:not(:first-child)::before {
    background: var(--c29-primary);
}

.c29-wizard-progress-cercle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--c29-white);
    border: 2px solid var(--c29-border);
    color: var(--c29-gray-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.c29-wizard-progress-step.is-active .c29-wizard-progress-cercle {
    background: var(--c29-primary);
    border-color: var(--c29-primary);
    color: var(--c29-white);
}

.c29-wizard-progress-step.is-fait .c29-wizard-progress-cercle {
    background: var(--c29-white);
    border-color: var(--c29-primary);
    color: var(--c29-primary);
}

.c29-wizard-progress-label {
    font-size: 11px;
    color: var(--c29-gray-text);
    margin-top: 6px;
    font-weight: 600;
}

.c29-wizard-progress-step.is-active .c29-wizard-progress-label {
    color: var(--c29-primary);
}

/* v0.16.0 : pastilles déjà franchies, cliquables pour y revenir directement */
.c29-wizard-progress-step.is-clickable {
    cursor: pointer;
}

.c29-wizard-progress-step.is-clickable:hover .c29-wizard-progress-cercle {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.c29-wizard-progress-step.is-clickable:hover .c29-wizard-progress-label {
    color: var(--c29-primary);
}

.c29-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 10px;
}

/* ============ v0.15.0 : GROUPE TÉLÉPHONE (INDICATIF + NUMÉRO) ============ */

.c29-phone-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.c29-phone-group .c29-indicatif-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 140px;
}

.c29-phone-group .c29-indicatif-autre {
    flex: 0 0 80px;
    width: 80px;
}

.c29-phone-group .c29-indicatif-autre,
.c29-phone-group input[type="text"]:not(.c29-indicatif-autre) {
    flex: 1;
    min-width: 120px;
}

/* ============ v0.15.0 : RÉCAPITULATIF (ÉTAPE DE VÉRIFICATION) ============ */

.c29-recap-table {
    width: 100%;
    border-collapse: collapse;
}

.c29-recap-table th,
.c29-recap-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--c29-border);
    text-align: left;
    font-size: 14px;
}

.c29-recap-table th {
    width: 40%;
    color: var(--c29-gray-text);
    font-weight: 600;
}

.c29-recap-table td {
    color: var(--c29-gray-dark);
    font-weight: 600;
}

/* ============ v0.15.0 : REÇU IMPRIMABLE ============ */

.c29-recu-wrapper {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.c29-recu-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.c29-recu-document {
    background: var(--c29-white);
    border: 1px solid var(--c29-border);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
}

.c29-recu-entete {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 3px solid var(--c29-primary);
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.c29-recu-entete h1 {
    font-size: 22px;
    margin: 0 0 6px;
}

.c29-recu-entete p {
    font-size: 13px;
    color: var(--c29-gray-text);
    margin: 2px 0;
}

.c29-recu-titre-type {
    text-align: right;
}

.c29-recu-titre-type h2 {
    font-size: 16px;
    letter-spacing: 0.5px;
    color: var(--c29-gray-dark);
    margin: 0 0 6px;
}

.c29-recu-titre-type p {
    font-size: 12px;
    color: var(--c29-gray-text);
    margin: 2px 0;
}

.c29-recu-table-info,
.c29-recu-table-montant {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.c29-recu-table-info th,
.c29-recu-table-info td,
.c29-recu-table-montant th,
.c29-recu-table-montant td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--c29-border);
    font-size: 14px;
    text-align: left;
}

.c29-recu-table-info th {
    width: 30%;
    color: var(--c29-gray-text);
    font-weight: 600;
}

.c29-recu-table-montant thead th {
    background: var(--c29-gray-light);
    font-weight: 700;
    color: var(--c29-gray-dark);
}

.c29-recu-table-montant td:last-child,
.c29-recu-table-montant th:last-child {
    text-align: right;
    font-weight: 700;
}

.c29-recu-sous-ligne {
    color: var(--c29-gray-text);
    font-weight: 400 !important;
    font-size: 13px !important;
}

.c29-recu-responsables h3 {
    font-size: 14px;
    color: var(--c29-gray-dark);
    margin: 0 0 8px;
}

.c29-recu-responsables ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--c29-gray-dark);
}

.c29-recu-pied {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--c29-border);
    text-align: center;
}

.c29-recu-pied p {
    font-size: 12px;
    color: var(--c29-gray-text);
}

/* À l'impression : on ne garde que le document du reçu, sans la barre de
   navigation ni les boutons d'action ("Imprimer", "Envoyer au Parent/Tuteur"). */
@media print {
    .c29-navbar,
    .no-print {
        display: none !important;
    }
    .c29-recu-wrapper {
        max-width: 100%;
        padding: 0;
    }
    .c29-recu-document {
        border: none;
        padding: 0;
    }
}

/* ==========================================================
   COMPTES UTILISATEURS : CONNEXION / INSCRIPTION (v0.17.0)
   ========================================================== */

.c29-form-message.c29-msg-info {
    padding: 12px 15px;
    background: #eaf2fe;
    color: var(--c29-primary);
    border-radius: 6px;
}

#c29-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--c29-primary) 0%, var(--c29-primary-dark) 100%);
}

.c29-auth-wrap {
    background: var(--c29-white);
    width: 100%;
    max-width: 460px;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    padding: 34px 32px 30px;
}

.c29-auth-brand {
    text-align: center;
    margin-bottom: 22px;
}

.c29-auth-brand h1 {
    margin: 0 0 4px;
    font-size: 26px;
    color: var(--c29-primary);
}

.c29-auth-brand p {
    margin: 0;
    color: var(--c29-gray-text);
    font-size: 14px;
}

.c29-auth-tabs {
    display: flex;
    background: var(--c29-gray-light);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}

.c29-auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c29-gray-text);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.c29-auth-tab-active {
    background: var(--c29-white);
    color: var(--c29-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.c29-auth-form .c29-form-row {
    margin-bottom: 16px;
}

.c29-auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

.c29-auth-note {
    font-size: 12.5px;
    color: var(--c29-gray-text);
    margin: -6px 0 16px;
}

/* ============ NAVBAR : compte connecté, logo école (v0.17.0) ============ */

.c29-navbar-logo {
    height: 26px;
    width: 26px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
}

.c29-navbar-user {
    color: var(--c29-gray-text);
    font-size: 13px;
    padding: 0 4px;
}

.c29-navbar-logout {
    background: var(--c29-gray-light);
    padding: 6px 14px !important;
    border-radius: 20px;
}

/* ============ Logos d'école dans la liste des établissements ============ */

.c29-ecole-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid var(--c29-white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ==========================================================
   "AUTRES FRAIS" DYNAMIQUES (v0.17.0)
   ========================================================== */

.c29-frais-ligne {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.c29-frais-ligne .c29-frais-libelle {
    flex: 2;
}

.c29-frais-ligne .c29-frais-montant {
    flex: 1;
}

.c29-frais-ligne input {
    padding: 9px 12px;
    border: 1px solid var(--c29-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}

.c29-frais-supprimer {
    border: none;
    background: var(--c29-gray-light);
    color: var(--c29-error);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

/* ==========================================================
   QR CODE SUR LE REÇU / LE DOSSIER (v0.17.0)
   ========================================================== */

.c29-recu-qr-bloc img,
#c29-secr-qr img,
#c29-dossier-qr img {
    width: 84px;
    height: 84px;
}

/* ==========================================================
   DOSSIERS ÉLÈVES : LISTE ET DÉTAIL (v0.17.0)
   ========================================================== */

.c29-btn-small {
    padding: 6px 14px !important;
    font-size: 13px !important;
}

.c29-dossier-miniature {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.c29-dossier-photo-grande {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
}
