/**
 * Sytelis - CSS Principal
 * Design sobre et professionnel
 */

/* === VARIABLES CSS === */
:root {
    --primary-color: #4FB3C5;      /* Bleu turquoise */
    --secondary-color: #5EBD9E;    /* Vert émeraude */
    --accent-color: #F2994A;       /* Orange */
    --dark-color: #2C3E50;         /* Gris foncé */
    --light-gray: #ECF0F1;
    --text-color: #333333;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

/* === HEADER === */
header {
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
    line-height: 1;
}

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

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    min-height: 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    margin: 0.5rem 0;
}

.logo img {
    height: 80px;
    margin-right: 15px;
    display: block;
    vertical-align: middle;
}

.logo-tagline {
    font-size: 1rem;
    color: var(--dark-color);
    display: block;
    font-weight: normal;
}

.logo:hover {
    transform: scale(1.05);
}

/* === NAVIGATION === */
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

nav a:hover::after,
nav a.active::after {
    width: 80%;
}

/* Menu mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: var(--transition);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    opacity: 0.3;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn:hover {
    background: #E8843F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 153, 74, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--white);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* === SECTIONS === */
section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* === SERVICES GRID === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* === FORMULAIRE DE CONTACT === */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--light-gray);
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 179, 197, 0.1);
}

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

/* === FOOTER === */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.footer-section p,
.footer-section a {
    color: var(--light-gray);
    text-decoration: none;
    line-height: 2;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-gray);
}

/* === WHATSAPP FLOATING BUTTON === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 5px 25px rgba(37, 211, 102, 0.6);
    }
}

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

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

.slide-in-left {
    animation: slideInLeft 0.8s ease;
}

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

.slide-in-right {
    animation: slideInRight 0.8s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === LOADING SPINNER === */
.spinner {
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === RESPONSIVE === */

/* Tablettes et petits écrans */
@media (max-width: 992px) {
    .container {
        padding: 3rem 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Smartphones et iPhone */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        padding: 0 1rem;
    }

    .logo {
        flex: 1;
    }

    .logo img {
        height: 90px;
    }

    .logo-tagline {
        font-size: 0.85rem;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        order: 3;
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        padding-top: 1rem;
        gap: 0;
    }

    nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--light-gray);
    }

    nav a::after {
        display: none;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

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

    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 0;
    }

    .container {
        padding: 2rem 1rem;
    }

    section {
        margin-bottom: 3rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    section h2::after {
        width: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .contact-form {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Évite le zoom automatique sur iPhone */
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        padding: 1rem 0;
    }

    .social-links {
        justify-content: center;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
}

/* iPhone SE et petits smartphones */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.6rem;
    }

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

    section h2 {
        font-size: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 3rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}

/* Optimisations tactiles pour iPhone */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter la zone de clic sur mobile */
    nav a,
    .btn,
    .btn-small {
        min-height: 44px; /* Taille recommandée Apple */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Désactiver le parallax sur mobile pour les performances */
    .hero {
        transform: none !important;
    }

    /* Retours haptiques visuels */
    .btn:active,
    .service-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* === ALERTES === */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    animation: slideDown 0.5s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

