/* ===================================
   CVpourTous - Custom CSS avec Bootstrap 5
   Design System DevTek
   =================================== */

:root {
    /* Couleurs DevTek */
    --devtek-blue: #1e73b1;
    --devtek-orange: #ee722b;
    --devtek-blue-dark: #155b8a;
    --bs-primary: #1e73b1;
    --bs-primary-rgb: 30, 115, 177;
    --bs-warning: #ee722b;
    --bs-warning-rgb: 238, 114, 43;

    /* Variables compatibles Walu */
    --primary-color: #1e73b1;
    --primary-dark: #155b8a;
    --secondary-color: #ee722b;
    --secondary-dark: #d46224;

    /* Couleurs système */
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Couleurs neutres */
    --black: #000000;
    --white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #777777;
    --bg-light: #f8f9fa;
    --border-color: #e5e5e5;

    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* Surcharge Bootstrap avec les couleurs DevTek */
.btn-primary {
    background-color: var(--devtek-blue);
    border-color: var(--devtek-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--devtek-blue-dark);
    border-color: var(--devtek-blue-dark);
}

.btn-outline-primary {
    color: var(--devtek-blue);
    border-color: var(--devtek-blue);
}

.btn-outline-primary:hover {
    background-color: var(--devtek-blue);
    border-color: var(--devtek-blue);
}

.btn-warning {
    background-color: var(--devtek-orange);
    border-color: var(--devtek-orange);
    color: white;
}

.btn-warning:hover {
    background-color: #d6651f;
    border-color: #d6651f;
    color: white;
}

.text-primary {
    color: var(--devtek-blue) !important;
}

.bg-primary {
    background-color: var(--devtek-blue) !important;
}

.badge.bg-primary {
    background-color: var(--devtek-blue) !important;
}

/* Navbar personnalisée */
.navbar-brand {
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--devtek-blue) 0%, var(--devtek-blue-dark) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    background: #f8f9fa;
}

/* Template Cards */
.template-card {
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.template-preview {
    height: 250px;
    background: #f8f9fa;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-placeholder {
    font-size: 4rem;
    color: #dee2e6;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    height: 100%;
}

.feature-card i {
    font-size: 3rem;
    color: var(--devtek-blue);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Auth Forms */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 500px;
    width: 100%;
}

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

.auth-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--devtek-blue);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.auth-footer a {
    color: var(--devtek-blue);
    font-weight: 600;
}

/* Form Errors */
.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: #dc3545;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    text-align: center;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--devtek-blue);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #212529;
}

.stat-card p {
    color: #6c757d;
    margin: 0;
}

/* Section Headers */
.section-header {
    border-left: 4px solid var(--devtek-blue);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #212529;
}

/* Table Customization */
.table {
    background: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--devtek-blue);
    font-weight: 600;
}

/* Badges DevTek */
.badge.bg-devtek-blue {
    background-color: var(--devtek-blue) !important;
}

.badge.bg-devtek-orange {
    background-color: var(--devtek-orange) !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 0.5rem;
}

.empty-state i {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Error Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content i {
    font-size: 5rem;
    color: var(--devtek-orange);
    margin-bottom: 1rem;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }

    .error-content h1 {
        font-size: 4rem;
    }
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Auto-hide alerts */
.alert {
    animation: slideDown 0.3s ease-out;
}

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

/* CV List Grid */
.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Utilities */
.text-devtek-blue {
    color: var(--devtek-blue) !important;
}

.text-devtek-orange {
    color: var(--devtek-orange) !important;
}

.bg-devtek-blue {
    background-color: var(--devtek-blue) !important;
}

.bg-devtek-orange {
    background-color: var(--devtek-orange) !important;
}

.shadow-devtek {
    box-shadow: 0 0.5rem 1rem rgba(30, 115, 177, 0.15) !important;
}

/* ===================================
   CV Editor
   =================================== */

.cv-editor-form {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
}

.cv-editor-form::-webkit-scrollbar {
    width: 8px;
}

.cv-editor-form::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cv-editor-form::-webkit-scrollbar-thumb {
    background: var(--devtek-blue);
    border-radius: 10px;
}

.cv-editor-form::-webkit-scrollbar-thumb:hover {
    background: var(--devtek-blue-dark);
}

/* CV Preview */
.cv-preview-container {
    position: sticky;
    top: 20px;
}

.cv-preview {
    background: white;
    min-height: 500px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.cv-preview::-webkit-scrollbar {
    width: 6px;
}

.cv-preview::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.cv-preview::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

/* Preview Header */
.preview-header h1 {
    color: var(--devtek-blue);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.preview-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-info {
    font-size: 0.85rem;
}

.contact-info i {
    width: 16px;
    text-align: center;
}

/* Preview Sections */
.preview-section h3 {
    color: var(--devtek-blue);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.preview-section h3 i {
    margin-right: 8px;
}

.preview-section .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Experience & Education Items */
.preview-section > div > div {
    position: relative;
    padding-left: 20px;
}

.preview-section > div > div::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--devtek-blue);
    border-radius: 50%;
}

/* Responsive CV Editor */
@media (max-width: 991px) {
    .cv-preview-container {
        position: static;
        margin-top: 2rem;
    }

    .cv-editor-form {
        max-height: none;
    }

    .cv-preview {
        max-height: 600px;
    }
}

/* Animation for adding items */
.experience-item,
.education-item,
.skill-item,
.language-item {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================
   Google OAuth Button Styles
   =================================== */

/* Divider for OAuth */
.divider-oauth {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider-oauth::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #ddd;
}

.divider-oauth span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #999;
    font-size: 0.875rem;
}

/* Google OAuth Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #bbb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    text-decoration: none;
}

.btn-google:active {
    transform: translateY(0);
}

/* Responsive adjustments for OAuth */
@media (max-width: 768px) {
    .btn-google {
        font-size: 0.9rem;
    }
}

/* Logo et images styles */
img, svg {
    vertical-align: middle;
    max-width: 200px;
}
