/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    line-height: 1.6;
    color:black;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Logo et en-tête */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.logo-container h1 {
    font-size: 2.5rem;
    color: white;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-top: 5px;
}

/* Cartes */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    font-size: 1.8rem;
    color: #333;
    font-weight: 400;
    margin-bottom: 8px;
}

.card-subtitle {
    color: #666;
    font-size: 0.95rem;
}

/* Formulaires */
.form-container {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-control:focus {
    outline: none;
    border-color: #4285f4;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Boutons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: orange;
    color: white;
}

.btn-primary:hover {
    background: orange;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-secondary {
    background: #f1f3f4;
    color: #444;
}

.btn-secondary:hover {
    background: #e8eaed;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Liens */
.link {
    color: #4285f4;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.link:hover {
    color: #3367d6;
    text-decoration: underline;
}

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    color: black;
    font-size: 0.9rem;
}

.lang-selector select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 10px;
}

/* Messages */
.error-message {
    color: #d93025;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.info-message {
    color: #666;
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-message.warning {
    color: #f4b400;
}

.success-message {
    color: #0f9d58;
    background: #e6f4ea;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Barre de progression */
.progress-bar {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 40px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #4285f4;
    color: white;
    transform: scale(1.1);
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: -1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-bar.horizontal {
    padding: 20px 30px;
    gap: 10px;
}

.progress-bar.horizontal .progress-step {
    flex: 1;
    flex-direction: column;
    height: auto;
    width: auto;
    background: transparent;
    gap: 5px;
}

.progress-bar.horizontal .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.progress-bar.horizontal .step-label {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.progress-bar.horizontal .progress-step.active .step-number {
    background: #4285f4;
    color: white;
}

.progress-bar.horizontal .progress-step.active .step-label {
    color: #4285f4;
    font-weight: 500;
}

/* Code d'entrée */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: #4285f4;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    outline: none;
}

/* Compte à rebours */
.countdown {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    color: #4285f4;
    margin: 15px 0;
}

/* Force du mot de passe */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* Compteur de caractères */
.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile */
.mobile-container {
    width: 100%;
    max-width: 480px;
    background: white;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 20%;
}

.header-left h1 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 500;
}

.back-btn {
    color: #4285f4;
    font-size: 1.2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #f5f5f5;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: #f5f5f5;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4285f4;
}

/* Contenu dashboard */
.dashboard-content {
    padding: 20px;
}

.welcome-section {
    background: linear-gradient(135deg, #4285f4, #3367d6);
    color: white;
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.welcome-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.welcome-section p {
    opacity: 0.9;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #4285f4;
    font-size: 1.5rem;
}

.dashboard-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.dashboard-card p {
    font-size: 0.85rem;
    color: #666;
}

.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 80px;
}

.quick-actions h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    text-decoration: none;
    color: #333;
    transition: background 0.3s ease;
}

.action-item:hover {
    background: #f9f9f9;
}

.action-item i:first-child {
    margin-right: 15px;
    color: #4285f4;
    font-size: 1.2rem;
    width: 24px;
}

.action-item span {
    flex: 1;
    font-size: 0.95rem;
}

.action-item i:last-child {
    color: #999;
    font-size: 0.9rem;
}

.action-item.logout {
    color: #d93025;
}

.action-item.logout i:first-child {
    color: #d93025;
}

/* Profile */
.profile-content {
    padding: 20px;
    padding-bottom: 80px;
}

.profile-header {
    margin-bottom: 30px;
}

.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-photo-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4285f4;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s ease;
}

.photo-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
}

.profile-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #333;
}

.profile-info p {
    color: #666;
    margin-bottom: 5px;
}

.text-muted {
    color: #999;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 500;
    color: #4285f4;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Footer mobile */
.mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
    gap: 5px;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 8px;
}

.footer-item i {
    font-size: 1.2rem;
}

.footer-item.active {
    color: #4285f4;
}

.footer-item:hover {
    background: #f5f5f5;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #e6f4ea;
    color: #0f9d58;
    border: 1px solid #a8dab5;
}

.alert-error {
    background: #fce8e6;
    color: #d93025;
    border: 1px solid #f4c7c3;
}

/* Terms */
.terms {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms input[type="checkbox"] {
    margin-top: 3px;
}

.terms label {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 25px;
    }
}

/* Animation de chargement */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}