/* ==========================================
   AMBULANCE TANGER PRIVÉ - STYLES PRINCIPAUX
   ========================================== */

/* Importation des polices */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset & Variables */
:root {
    /* Couleurs principales */
    --primary-blue: #62A1FA;
    --dark-blue: #183D66;
    --accent-blue: #4FC3F7;
    --urgent-red: #CE343A;
    --light-gray: #F5F7FB;
    --white: #ffffff;
    --text-dark: #2C3E50;
    --text-light: #6C757D;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #62A1FA 0%, #183D66 100%);
    --gradient-hero: linear-gradient(135deg, rgba(24, 61, 102, 0.95) 0%, rgba(98, 161, 250, 0.9) 100%);

    /* Polices */
    --font-heading: 'Times New Roman', Times, serif;
    --font-body: 'Inter', sans-serif;

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Section */
section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-title h2 {
    color: var(--dark-blue);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-sm);
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(98, 161, 250, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-blue);
    border-radius: 3px;
    transition: var(--transition-base);
}

/* ==========================================
   BOUTONS
   ========================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(98, 161, 250, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(98, 161, 250, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-urgent {
    background: var(--urgent-red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(206, 52, 58, 0.3);
}

.btn-urgent:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(206, 52, 58, 0.4);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================
   BOUTONS FLOTTANTS (Call & WhatsApp)
   ========================================== */
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition-base);
    cursor: pointer;
    animation: pulse 2s infinite;
}

.floating-btn.call {
    background: var(--urgent-red);
}

.floating-btn.whatsapp {
    background: #25D366;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    }
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: var(--white);
    border-radius: 20px;
    padding: var(--spacing-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ==========================================
   FORMULAIRES
   ========================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
    font-weight: 600;
    font-family: var(--font-heading);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-base);
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(98, 161, 250, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation ECG (pour Hero section) */
.ecg-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-blue);
    opacity: 0.3;
}

.ecg-line::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 2px;
    background: var(--white);
    animation: ecgPulse 2s linear infinite;
}

@keyframes ecgPulse {
    0% {
        left: -100px;
    }
    100% {
        left: 100%;
    }
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .floating-buttons {
        bottom: 6rem;
        right: 1rem;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    section {
        padding: var(--spacing-md) 0;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 30px rgba(220, 38, 38, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
    }
}
