/**
 * Main Stylesheet
 *
 * @package Guide_Des_Emprunteurs
 */

/* ==========================================
   CUSTOM UTILITIES
   ========================================== */

/* Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--color-secondary-500), var(--color-secondary-600));
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

.animate-pulse-slow {
    animation: pulse 3s infinite;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Delay utilities */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }

/* ==========================================
   COMPONENT STYLES
   ========================================== */

/* Section Spacing */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .section-subtitle {
    color: var(--color-primary-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.section-header .section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-slate-900);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-header .section-title {
        font-size: 3rem;
    }
}

/* Cards */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-slate-100);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.75rem;
}

.card-description {
    color: var(--color-slate-500);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-slate-900);
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--color-primary-600);
    transform: translateX(4px);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 4rem;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero-section {
        padding-top: 12rem;
        padding-bottom: 6rem;
    }
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(80px);
    opacity: 0.7;
    animation: blob 7s infinite;
}

.hero-badge {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ==========================================
   STATS SECTION
   ========================================== */

.stats-section {
    background: var(--color-slate-900);
    color: var(--color-white);
    padding: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3.5rem;
    }
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-slate-400);
}

/* ==========================================
   SERVICES GRID
   ========================================== */

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--color-white);
    border: 1px solid var(--color-slate-100);
    border-radius: var(--radius-3xl);
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.service-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-card-icon {
    color: var(--color-white) !important;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact-section {
    background: var(--color-surface);
    position: relative;
    overflow: hidden;
}

.contact-blob {
    position: absolute;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
}

.contact-card {
    background: var(--color-primary-600);
    border-radius: 3rem;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .contact-card {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    padding: 4rem 2.5rem;
    color: var(--color-white);
}

.contact-form-wrapper {
    background: var(--color-white);
    padding: 4rem 2.5rem;
}

/* ==========================================
   FORM STYLES
   ========================================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-slate-700);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-slate-50);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary-600);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-secondary-500);
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-secondary-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-slate-700);
    border: 1px solid var(--color-slate-200);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-slate-50);
    border-color: var(--color-primary-600);
    color: var(--color-primary-600);
}

.btn-full {
    width: 100%;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer-link {
    display: block;
    color: var(--color-slate-500);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-primary-600);
}

.footer-heading {
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 1rem;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-primary { color: var(--color-primary-600); }
.text-secondary { color: var(--color-secondary-500); }
.text-surface { color: var(--color-surface); }

.bg-primary { background-color: var(--color-primary-600); }
.bg-secondary { background-color: var(--color-secondary-500); }
.bg-surface { background-color: var(--color-surface); }

.rounded-hero { border-radius: 2.5rem; }
.rounded-card { border-radius: var(--radius-2xl); }

.shadow-soft { box-shadow: var(--shadow-soft); }

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */

@media (max-width: 767px) {
    .text-responsive {
        font-size: 1.5rem;
    }

    .hide-mobile {
        display: none;
    }
}

@media (min-width: 768px) {
    .show-mobile {
        display: none;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .no-print,
    nav,
    footer,
    .contact-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    .page-break {
        page-break-before: always;
    }
}
