/* ================================================
   ALHIDAYA — Styles Pages Utilisateur
   Auth + Compte client
   ================================================ */

/* ================================================
   AUTH — Connexion / Inscription
   ================================================ */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f7f4 0%, #e0f2f0 50%, #f8f7f4 100%);
}

.auth-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.auth-card-lg { max-width: 560px; }

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

/* .auth-logo img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: none;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
} */

.auth-logo img {
    filter: none;
    background: transparent;
    padding: 0;
    height: 80px;
    transform: scale(2.0);
    transform-origin: center center;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 8px;
}

.auth-logo-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

/* Titre */
.auth-titre {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    text-align: center;
}

.auth-desc {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

/* Messages */
.auth-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.auth-message-error {
    background: #fde8e8;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.auth-message-success {
    background: #eafde8;
    color: #276749;
    border: 1px solid #9ae6b4;
}

/* Formulaire */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 15px;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    background: white;
}

.form-input.with-icon { padding-left: 42px; }

.form-input:focus { border-color: var(--teal); }

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    resize: none;
    height: 80px;
}

.form-textarea:focus { border-color: var(--teal); }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Label infos */
.label-info {
    font-size: 11px;
    color: var(--teal);
    font-weight: 400;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
}

.label-optional {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
    background: var(--warm-gray);
    padding: 1px 6px;
    border-radius: 4px;
}

.form-group.full { grid-column: 1 / -1; }

/* Bouton submit */
.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    margin-top: 4px;
}

.auth-submit:hover { opacity: 0.88; }

/* Divider */
.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* Bouton alternatif */
.auth-alt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    color: var(--teal);
    border: 1.5px solid var(--teal);
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-alt-btn:hover {
    background: var(--teal);
    color: white;
}

/* ================================================
   MON COMPTE
   ================================================ */
.compte-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    padding: 32px 0 60px;
    align-items: start;
}

/* Sidebar */
.compte-sidebar {
    position: sticky;
    top: 90px;
}

/* Avatar */
.compte-avatar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 14px;
}

.avatar-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.avatar-nom {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.avatar-email {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.avatar-role {
    display: inline-flex;
    align-items: center;
    background: var(--teal-light);
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Nav compte */
.compte-nav {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.compte-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.compte-nav-item:hover {
    background: var(--warm-gray);
    color: var(--text);
}

.compte-nav-item.active {
    background: var(--teal-light);
    color: var(--teal-dark);
    font-weight: 500;
}

.compte-nav-item i { font-size: 16px; }

.compte-nav-admin {
    color: var(--teal-dark);
    background: var(--teal-light);
    margin-top: 8px;
}

.compte-nav-logout {
    color: #e53e3e;
    margin-top: 4px;
}

.compte-nav-logout:hover { background: #fde8e8; color: #e53e3e; }

/* Tabs contenu */
.compte-tab { display: none; }
.compte-tab.active { display: block; }

/* Section */
.compte-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
}

.compte-section-titre {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
}

/* Liste commandes */
.commandes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.commande-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--warm-gray);
    border-radius: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.commande-row-num {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.commande-row-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.commande-row-total {
    font-size: 15px;
    font-weight: 700;
    color: var(--teal-dark);
}

.commande-row-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s;
    white-space: nowrap;
}

.commande-row-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* Badges statut */
.commande-statut {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.statut-attente { background: var(--gold-light); color: #8a5c00; }
.statut-confirmee { background: #e8f2fe; color: #1e4d7b; }
.statut-preparation { background: #fff3e0; color: #e65100; }
.statut-expediee { background: var(--teal-light); color: var(--teal-dark); }
.statut-livree { background: #eafde8; color: #1a6b1a; }
.statut-annulee { background: #fde8e8; color: #e53e3e; }

/* Etat vide */
.compte-empty {
    text-align: center;
    padding: 40px 20px;
}

.compte-empty i {
    font-size: 48px;
    color: var(--border);
    display: block;
    margin-bottom: 12px;
}

.compte-empty p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Profil form */
.profil-form { display: flex; flex-direction: column; gap: 16px; }

/* Adresses */
.adresses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.adresse-card {
    background: var(--warm-gray);
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.adresse-principale-tag {
    display: inline-flex;
    align-items: center;
    background: var(--teal-light);
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.adresse-ville {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.adresse-details {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.adresse-actions { display: flex; gap: 8px; }

.adresse-del-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #e53e3e;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fde8e8;
    transition: background 0.15s;
}

.adresse-del-btn:hover { background: #e53e3e; color: white; }

/* Ajouter adresse */
.ajouter-adresse {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.ajouter-adresse-titre {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.adresse-form { display: flex; flex-direction: column; gap: 14px; }

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.check-item input[type="checkbox"] {
    accent-color: var(--teal);
    width: 16px;
    height: 16px;
}

.text-teal { color: var(--teal); }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 991px) {
    .compte-layout {
        grid-template-columns: 1fr;
    }
    .compte-sidebar { position: static; }
    .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .auth-card { padding: 32px 24px; }
    .auth-card-lg { padding: 32px 20px; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .commande-row { flex-direction: column; align-items: flex-start; }
}
/* ================================================
   SÉLECTEUR TÉLÉPHONE AVEC DRAPEAUX
   ================================================ */
.tel-input-wrap {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: visible;
    transition: border-color 0.15s;
    position: relative;
}

.tel-input-wrap:focus-within {
    border-color: var(--teal);
}

/* Dropdown */
.tel-dropdown {
    position: relative;
    flex-shrink: 0;
}

.tel-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    background: var(--warm-gray);
    border-right: 1px solid var(--border);
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    user-select: none;
    min-width: 100px;
    transition: background 0.15s;
}

.tel-selected:hover { background: var(--teal-light); }

.tel-flag { font-size: 20px; line-height: 1; }
.tel-code { font-size: 13px; font-weight: 500; color: var(--text); }
.tel-arrow {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
    transition: transform 0.2s;
}
.tel-arrow.open { transform: rotate(180deg); }

/* Options dropdown */
.tel-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 100;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
}

.tel-options.open { display: block; }

.tel-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.tel-option:hover { background: var(--teal-light); }
.tel-option:first-child { border-radius: 12px 12px 0 0; }
.tel-option:last-child { border-radius: 0 0 12px 12px; }

.tel-pays {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.tel-code-opt {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Input numéro */
.tel-numero {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    font-family: inherit;
    background: white;
    border-radius: 0 10px 10px 0;
    min-width: 0;
}

.tel-numero::placeholder { color: var(--text-muted); }

.tel-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
}

.tel-hint i { color: var(--teal); }


/* ================================================
   TOGGLE MOT DE PASSE
   ================================================ */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap .form-input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.toggle-password:hover { color: var(--teal); }


/* ================================================
   MES COMMANDES
   ================================================ */
.mes-commandes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 60px;
}

.mes-commandes-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.mes-commandes-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Header */
.mes-commandes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--warm-gray);
    flex-wrap: wrap;
    gap: 10px;
}

.mes-commandes-num {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
}

.mes-commandes-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Articles */
.mes-commandes-articles {
    padding: 8px 0;
}

.mes-commandes-article {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--warm-gray);
}

.mes-commandes-article:last-child {
    border-bottom: none;
}

.mes-commandes-article-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    flex-shrink: 0;
}

.mes-commandes-article-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.mes-commandes-article-img i {
    font-size: 24px;
    color: var(--border);
}

.mes-commandes-article-info {
    flex: 1;
    min-width: 0;
}

.mes-commandes-article-nom {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mes-commandes-article-details {
    font-size: 12px;
    color: var(--text-muted);
}

.mes-commandes-article-total {
    font-size: 15px;
    font-weight: 700;
    color: var(--teal-dark);
    flex-shrink: 0;
}

/* Footer */
.mes-commandes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.mes-commandes-total {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.mes-commandes-total strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--teal-dark);
}

.mes-commandes-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 576px) {
    .mes-commandes-header { flex-direction: column; align-items: flex-start; }
    .mes-commandes-footer { flex-direction: column; align-items: flex-start; }
    .mes-commandes-article-total { min-width: auto; }
}