/*
 * Chemin : ara-abonnement/assets/ara-style.css
 * Styles pour le système d'abonnement ARA SA
 */

:root {
    /* Héritage des couleurs globales du thème Kadence (avec l'orange comme valeur de secours) */
    --ara-primary: var(--global-palette1, #D85A30);
    --ara-primary-hover: var(--global-palette2, #c44f28);
    --ara-dark: var(--global-palette3, #993C1D);
    --ara-light: var(--global-palette8, #FEF2EE);
    --ara-bg: transparent; /* Fond transparent pour se fondre dans la page */
    --ara-text: var(--global-palette4, #333333);
    --ara-gray: var(--global-palette5, #777777);
    --ara-border: var(--global-palette6, #e0e0e0);
    --ara-radius: 8px;
    --ara-radius-lg: 12px;
}

.ara-wrap {
    font-family: inherit; /* Hérite automatiquement de la police du site (Kadence) */
    color: var(--ara-text);
    background-color: var(--ara-bg);
    padding-bottom: 50px;
    line-height: 1.6;
}

.ara-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Bandeau urgence */
.ara-urgence-bar {
    background-color: #ffe6e6;
    color: #cc0000;
    text-align: center;
    padding: 15px;
    font-weight: bold;
    border-bottom: 2px solid #ffcccc;
}

/* Boutons Modernes */
.ara-btn {
    background: linear-gradient(135deg, var(--ara-primary) 0%, #E86A40 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--ara-radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(216, 90, 48, 0.3);
}

.ara-btn:hover {
    background: linear-gradient(135deg, var(--ara-primary-hover) 0%, var(--ara-primary) 100%);
    box-shadow: 0 6px 20px rgba(216, 90, 48, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.ara-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(216, 90, 48, 0.3);
}

.ara-btn-outline {
    background: transparent;
    color: var(--ara-primary);
    border: 2px solid var(--ara-primary);
    box-shadow: none;
}

.ara-btn-outline:hover {
    background: var(--ara-light);
    color: var(--ara-dark);
    box-shadow: none;
    transform: translateY(-2px);
}

/* Tunnel / Progress */
.ara-progress {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    position: relative;
}

.ara-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ara-border);
    z-index: 1;
}

.ara-progress li {
    position: relative;
    z-index: 2;
    background: var(--ara-bg);
    padding: 0 10px;
    color: var(--ara-gray);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.ara-progress li::before {
    content: attr(data-step);
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: #fff;
    border: 2px solid var(--ara-border);
    border-radius: 50%;
    margin: 0 auto 5px auto;
}

.ara-progress li.active {
    color: var(--ara-primary);
}

.ara-progress li.active::before {
    border-color: var(--ara-primary);
    background: var(--ara-primary);
    color: #fff;
}

/* Steps (Design Premium) */
.ara-step {
    display: none;
    background: #ffffff;
    padding: 40px;
    border-radius: var(--ara-radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

.ara-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--ara-primary), #f57f17);
}

.ara-step.active {
    display: block;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Choix / Cards */
.ara-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

@media (min-width: 600px) {
    .ara-choices {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ara-choice-card {
    cursor: pointer;
    position: relative;
}

.ara-choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.ara-card-content {
    display: block;
    padding: 25px 20px;
    border: 2px solid var(--ara-border);
    border-radius: var(--ara-radius-lg);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    background: #fff;
}

.ara-choice-card:hover .ara-card-content {
    border-color: #d1d1d1;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.ara-choice-card input[type="radio"]:checked + .ara-card-content {
    border-color: var(--ara-primary);
    background-color: var(--ara-light);
    box-shadow: 0 0 0 1px var(--ara-primary), 0 10px 30px rgba(216, 90, 48, 0.15);
    transform: translateY(-3px);
}

.ara-title {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--ara-dark);
    margin-bottom: 5px;
}

.ara-desc {
    display: block;
    font-size: 14px;
    color: var(--ara-gray);
}

.ara-price {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--ara-primary);
    margin: 10px 0;
}

.ara-price small {
    font-size: 14px;
    font-weight: normal;
    color: var(--ara-gray);
}

/* Actions */
.ara-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

/* Formulaires */
.ara-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .ara-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ara-form-group {
    margin-bottom: 15px;
}

.ara-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--ara-dark);
}

.ara-form-group input[type="text"],
.ara-form-group input[type="email"],
.ara-form-group input[type="tel"],
.ara-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--ara-border);
    border-radius: var(--ara-radius);
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
}

.ara-form-group input:focus {
    outline: none;
    border-color: var(--ara-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(216, 90, 48, 0.15);
}

.ara-form-group input[type="file"] {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Actions */
.ara-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Alerts */
.ara-alert {
    padding: 15px;
    border-radius: var(--ara-radius);
    margin-bottom: 20px;
}

.ara-alert-error {
    background-color: #fdeaea;
    color: #cc0000;
    border: 1px solid #f5c6c6;
}

.ara-alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.ara-alert-warning {
    background-color: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffecb3;
}

/* Success Box */
.ara-success-box {
    text-align: center;
}

.ara-big-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--ara-primary);
    padding: 20px;
    border: 3px dashed var(--ara-primary);
    border-radius: var(--ara-radius);
    display: inline-block;
    margin: 20px 0;
    background: var(--ara-light);
}

/* Dashboard Mon Espace */
.ara-dashboard-header {
    background: #fff;
    padding: 20px;
    border-radius: var(--ara-radius-lg);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ara-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 2px solid var(--ara-border);
    margin-bottom: 20px;
}

.ara-tab-link {
    background: none;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ara-gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.ara-tab-link.active {
    color: var(--ara-primary);
    border-bottom-color: var(--ara-primary);
}

.ara-tab-content {
    display: none;
}

.ara-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.ara-box {
    background: #fff;
    padding: 20px;
    border-radius: var(--ara-radius-lg);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Badges */
.ara-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.ara-badge-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.ara-badge-warning { background: #fff8e1; color: #f57f17; border: 1px solid #ffecb3; }
.ara-badge-danger { background: #fdeaea; color: #cc0000; border: 1px solid #f5c6c6; }

/* Pricing Cards Features */
.ara-features {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    text-align: left;
    font-size: 14px;
}
.ara-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--ara-border);
    display: flex;
    align-items: center;
}
.ara-features li:last-child {
    border-bottom: none;
}
.ara-features li::before {
    content: '✓';
    color: #46b450;
    font-weight: bold;
    margin-right: 10px;
    font-size: 16px;
}
.ara-features li.disabled {
    color: var(--ara-gray);
    text-decoration: line-through;
}
.ara-features li.disabled::before {
    content: '✗';
    color: #dc3232;
    text-decoration: none;
}
.ara-pricing-card .ara-card-content {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.ara-pricing-card .ara-title {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ara-pricing-card .ara-price {
    font-size: 28px;
    margin: 15px 0;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--ara-border);
}
.ara-badge-popular {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--ara-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.ara-choice-card input[type="radio"]:checked + .ara-card-content {
    transform: translateY(-5px);
    box-shadow: 0 0 0 2px var(--ara-primary), 0 8px 25px rgba(0,0,0,0.1);
}

/* Dashboard Banner */
.ara-dashboard-banner {
    background: linear-gradient(135deg, var(--ara-primary) 0%, var(--ara-dark) 100%);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(216,90,48,0.2);
}
.ara-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ara-banner-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    border: 2px solid rgba(255,255,255,0.4);
}
.ara-banner-text h1 {
    margin: 0;
    color: white;
    font-size: 26px;
    letter-spacing: -0.5px;
}
.ara-banner-text .ara-numero {
    font-size: 15px;
    opacity: 0.9;
    margin-top: 5px;
    background: rgba(0,0,0,0.2);
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Tabs Redesign */
.ara-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 0px;
}
.ara-tab-link {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ara-tab-link:hover {
    color: var(--ara-primary);
    background: #fdf5f2;
}
.ara-tab-link.active {
    color: var(--ara-primary);
    background: #fdf5f2;
    box-shadow: inset 0 -3px 0 var(--ara-primary);
}

/* Stat Cards */
.ara-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.ara-stat-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.2s ease;
}
.ara-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
.ara-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}
.ara-stat-info {
    display: flex;
    flex-direction: column;
}
.ara-stat-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.ara-stat-value {
    font-size: 18px;
    color: #222;
    margin-top: 5px;
}

/* Progress Bar */
.ara-progress-wrap {
    background: #e9ecef;
    height: 12px;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 15px;
}
.ara-progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease-in-out;
}

/* Vehicule Cards */
.ara-vehicules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.ara-vehicule-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: border-color 0.3s;
}
.ara-vehicule-card:hover {
    border-color: var(--ara-primary);
}
.ara-vehicule-icon {
    font-size: 35px;
    background: #f4f6f8;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}
.ara-vehicule-info .immatriculation {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    letter-spacing: 1px;
}
.ara-vehicule-info .modele {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* Modern Table */
.ara-table-responsive {
    overflow-x: auto;
}
.ara-table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.ara-table-modern th {
    text-align: left;
    padding: 10px 20px;
    color: #888;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ara-table-modern td {
    background: #fff;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.ara-table-modern td:first-child {
    border-left: 1px solid #eee;
    border-radius: 8px 0 0 8px;
}
.ara-table-modern td:last-child {
    border-right: 1px solid #eee;
    border-radius: 0 8px 8px 0;
}
.ara-table-modern tr {
    box-shadow: 0 2px 5px rgba(0,0,0,0.01);
    transition: transform 0.2s;
}
.ara-table-modern tr:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Empty State */
.ara-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #fafafa;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    color: #777;
}

@media (max-width: 768px) {
    .ara-dashboard-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* Amélioration de l'expérience mobile pour la page d'abonnement */
    .ara-container {
        padding: 10px;
    }

    .ara-step {
        padding: 20px 15px 90px 15px; /* Espace en bas pour la barre fixe */
    }

    /* Barre de progression sur mobile */
    .ara-progress {
        margin: 0 0 20px 0;
    }
    .ara-progress li {
        font-size: 11px; /* Texte plus petit */
        padding: 0 5px;
    }
    .ara-progress li::before {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 12px;
    }
    .ara-progress::before {
        top: 12px;
    }

    /* Boutons épinglés en bas sur mobile */
    .ara-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px;
        margin: 0;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
        z-index: 999;
        flex-direction: row; /* "Suivant" à droite (ordre normal du HTML) */
        gap: 10px;
        border-top: 1px solid #eee;
    }
    .ara-btn {
        flex: 1; /* Les boutons se partagent l'espace également */
        padding: 14px 10px;
        font-size: 16px;
        margin: 0;
    }

    /* Cartes de formules */
    .ara-choices {
        grid-template-columns: 1fr !important; /* Force 1 colonne sur mobile */
        gap: 15px;
    }
    .ara-choice-card {
        padding: 15px;
    }
    .ara-pricing-card {
        padding: 20px 15px;
    }
    .ara-price {
        font-size: 28px;
    }

    /* Formulaire d'information (Inputs) : 2 colonnes pour réduire le scroll */
    .ara-form-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 colonnes sur mobile */
        gap: 8px; /* Espace réduit entre les colonnes */
    }
    .ara-form-group {
        margin-bottom: 10px; /* Moins d'espace en bas de chaque case */
    }
    .ara-form-group label {
        font-size: 12px; /* Label plus petit pour ne pas prendre trop de place */
        margin-bottom: 4px;
    }
    .ara-form-group input, 
    .ara-form-group select {
        padding: 8px 10px !important; /* Cases moins hautes */
        font-size: 13px !important; /* Texte plus fin */
        border-radius: 6px;
    }

    /* Résumé de paiement */
    .ara-summary {
        padding: 15px;
    }
    .ara-total {
        font-size: 20px;
    }
}
