/* Variables globales */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --success-hover: #059669;
    --google-color: #f8fafc;
    --google-hover: #e2e8f0;
    --text-color: #334155;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --form-padding: 1.5rem;
    --border-radius: 0.75rem;
    --card-padding: clamp(1rem, 3vw, 2rem);
    --mobile-spacing: 1rem;
}

/* Styles de base */
body {
    background-color: var(--bg-color);
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* Container principal responsive */
.main-content-container {
    width: 95%;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0.5rem;
}

/* Style des formulaires responsive */
.job-application-container {
    max-width: 100%;
    padding: 1rem;
}

/* Card styles */
.auth-card {
    border-radius: 1.5rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Form elements */
.form-floating > .form-control,
.form-floating > .form-select {
    height: 50px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
}

    .form-floating > .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    }

/* Button styles */
.btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-1px);
    }

/* Upload zone */
.upload-cv-section {
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.drop-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 1rem;
    min-height: 120px;
    transition: all 0.3s ease;
}

/* Form Layout */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: clamp(1rem, 5vw, 2rem);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Upload Zone */
.upload-section {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: clamp(1rem, 3vw, 2rem);
    margin: 1.5rem 0;
}

.upload-container {
    position: relative;
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

    .upload-container:hover {
        background: rgba(99, 102, 241, 0.05);
    }

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Wizard Steps Styling */
.wizard-tabs2 {
    background: transparent;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.wizard-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Mobile Responsive Steps */
@media (max-width: 768px) {
    .wizard-tabs2 {
        padding: 0.5rem;
        background: white;
        margin: 0.5rem;
        border-radius: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .step-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        background: #f8fafc;
        border: 1px solid var(--border-color);
    }

    .step-item.active {
        background: var(--primary-color);
        color: white;
    }

    .step-item.active .step-number {
        background: white;
        color: var(--primary-color);
    }

    .step-content {
        flex: 1;
    }

    .step-title {
        font-size: 1rem;
        margin: 0;
        font-weight: 500;
    }

    .step-subtitle {
        font-size: 0.875rem;
        margin: 0;
        opacity: 0.8;
    }
}

/* Media queries pour les différentes tailles d'écran */
@media (max-width: 768px) {
    /* Container principal */
    .main-content-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0.5rem !important;
    }

    /* En-tête */
    .banner-area {
        padding: 1rem 0 !important;
    }

    .banner-content h1 {
        font-size: 1.5rem !important;
        padding: 0 1rem;
    }

    /* Navigation par étapes */
    .wizard-tabs2 {
        padding: 0.5rem !important;
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem !important;
    }

    /* Formulaires */
    .card-body {
        padding: var(--mobile-spacing) !important;
    }

    .form-floating {
        margin-bottom: 1rem;
    }

    .row > [class*="col-"] {
        padding: 0.25rem !important;
    }

    /* Zone de téléchargement */
    .upload-cv-section {
        padding: var(--mobile-spacing) !important;
        margin: 0.5rem 0 !important;
    }

    .drop-zone {
        padding: 1rem !important;
        min-height: auto !important;
    }

    /* Boutons d'action */
    .action-buttons {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
    }

    .action-buttons .btn {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Sections de compétences */
    .skills-container {
        padding: 0.75rem !important;
    }

    .input-group {
        margin-bottom: 0.5rem !important;
    }

    /* Alertes et notifications */
    .toast {
        width: 90% !important;
        margin: 0.5rem auto !important;
    }

    /* Auth sections */
    .auth-section {
        padding: var(--mobile-spacing) !important;
    }

    .auth-card {
        border-radius: 0.5rem !important;
    }

    /* Progress bar */
    .submission-progress {
        width: 100% !important;
    }

    /* Experience et Education */
    .experience-item,
    .education-item {
        margin-bottom: 0.75rem !important;
    }

    .section {
        margin-bottom: 1.5rem !important;
    }

    /* Ajustements pour petits écrans */
    @media (max-width: 320px) {
        .form-control,
        .form-select {
            font-size: 14px !important;
        }

        .btn {
            padding: 0.5rem !important;
            font-size: 14px !important;
        }
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content-container {
        width: 90%;
    }

    .auth-section {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Alert styles */
.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Progress styles */
.progress {
    border-radius: 0.5rem;
    height: 0.75rem;
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 0.5rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --card-bg: #2d2d2d;
        --text-color: #e5e5e5;
        --border-color: #404040;
    }
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --success-hover: #059669;
    --google-color: #f8fafc;
    --google-hover: #e2e8f0;
    --text-color: #334155;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
}

body {
    background-color: var(--bg-color);
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.auth-container {
    max-width: 1000px;
    margin: 2rem auto;
}

.auth-card {
    border-radius: 1.5rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .auth-header h3 {
        font-weight: 600;
        color: var(--text-color);
        font-size: 1.75rem;
    }

    .auth-header p {
        color: var(--light-text);
        margin-top: 0.5rem;
    }

.form-control {
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background-color: #f8fafc;
    color: var(--text-color);
    transition: all 0.3s ease;
}

    .form-control:focus {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        border-color: var(--primary-color);
        background-color: white;
    }

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover, .btn-primary:focus {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    }

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

    .btn-success:hover, .btn-success:focus {
        background-color: var(--success-hover);
        border-color: var(--success-hover);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    }

.btn-google {
    background-color: var(--google-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

    .btn-google:hover, .btn-google:focus {
        background-color: var(--google-hover);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

.google-icon {
    margin-right: 10px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--light-text);
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid var(--border-color);
    }

    .divider::before {
        margin-right: 1rem;
    }

    .divider::after {
        margin-left: 1rem;
    }

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .forgot-password:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

.auth-section {
    padding: 2.5rem;
}

.auth-divider {
    position: relative;
}

    .auth-divider::after {
        content: '';
        position: absolute;
        top: 10%;
        right: 0;
        height: 80%;
        width: 1px;
        background-color: var(--border-color);
    }

.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

    .toast-header.bg-success {
        background: #10b981 !important;
    }

    .toast-header.bg-danger {
        background: #ef4444 !important;
    }

.toast-body {
    padding: 1rem;
    font-size: 0.95rem;
}

.submission-progress {
    width: 300px;
}

.progress {
    border-radius: 0.5rem;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: var(--bs-primary);
    border-radius: 0.5rem;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

/* Styles spécifiques pour iPhone XR */
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) {

    .main-content-container {
        max-width: 414px !important;
    }

    .card {
        border-radius: 1rem !important;
    }

    .form-control,
    .form-select,
    .btn {
        height: 44px !important; /* Meilleure accessibilité tactile */
    }

    .upload-cv-section {
        border-radius: 0.75rem !important;
    }
}

/* Fix pour la hauteur des inputs sur iOS */
@supports (-webkit-touch-callout: none) {
    .form-control,
    .form-select {
        min-height: 44px !important;
        line-height: 1.3 !important;
    }

    .form-floating label {
        padding-top: 0.7rem !important;
    }
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: #666;
    cursor: pointer;
    z-index: 2;
}

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

.form-floating .password-toggle {
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
}


/*******home*******/
/* Styles de recherche améliorés */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-box {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-input, .location-input {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-input i, .location-input i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 2;
    font-size: 1.1rem;
}

.form-control, .form-select {
    width: 100%;
    height: 48px;
    padding-left: 45px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #f9fafb;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-button {
    padding: 0 24px;
    height: 48px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 120px;
}

.search-button:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* Responsive styles */
@media (max-width: 768px) {
    .search-box {
        padding: 0.75rem;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .search-input, .location-input {
        width: 100%;
    }

    .search-button {
        width: 100%;
    }

    .form-control, .form-select {
        height: 44px;
        font-size: 16px; /* Éviter le zoom sur mobile */
    }
}

/* Styles pour les inputs en version mobile */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group > * {
        width: 100%;
        margin: 0 !important;
    }

    .form-control, 
    .form-select {
        height: 48px;
        font-size: 16px;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    .skills-container {
        padding: 1rem;
    }

    .skills-container .input-group {
        display: flex;
        flex-direction: row !important;
        margin-bottom: 0.5rem;
    }

    .skills-container .input-group .form-control {
        flex: 1;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .skills-container .input-group .btn {
        width: auto !important;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .skills-container .btn-sm {
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.5rem;
    }

    /* Ajustement des marges et paddings */
    .section {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    /* Style des boutons */
    .btn {
        padding: 0.75rem 1.25rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Amélioration de l'espacement */
    .card-body {
        padding: 1rem !important;
    }

    .row {
        margin: 0 -0.5rem;
    }

    .col-md-6 {
        padding: 0 0.5rem;
    }

    /* Amélioration de l'accessibilité tactile */
    .btn-outline-danger, 
    .btn-outline-primary {
        min-height: 44px;
    }

    /* Ajustement des icônes */
    .bi {
        font-size: 1.25rem;
    }
}

/* Styles spécifiques pour très petits écrans */
@media (max-width: 320px) {
    .form-control, 
    .form-select {
        font-size: 14px;
        height: 44px;
    }

    .section-title {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Section Headers avec ligne décorative */
.section-header {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        var(--primary-color),
        rgba(99, 102, 241, 0.2),
        transparent
    );
}

.section-header h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Section title avec ligne décorative */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        var(--primary-color),
        rgba(99, 102, 241, 0.2),
        transparent
    );
}

/* Responsive ajustements */
@media (max-width: 768px) {
    .section-header,
    .section-title {
        padding-bottom: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .section-header h5 {
        font-size: 1.1rem;
    }

    .section-header i,
    .section-title i {
        font-size: 1.25rem;
    }
}

