/* ============================================================
   Royal Technologies - Modern Home Page
   ============================================================ */

:root {
    --primary: #ce6c45;
    --primary-dark: #b35a36;
    --primary-light: #f4e3da;
    --secondary: #1e2a3a;
    --accent: #4a90e2;
    --gradient-1: linear-gradient(135deg, #ce6c45 0%, #b35a36 100%);
    --gradient-2: linear-gradient(135deg, #1e2a3a 0%, #2d3e54 100%);
    --gradient-hero: linear-gradient(135deg, #1e2a3a 0%, #2d3e54 50%, #ce6c45 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.18);
}

/* ============= HERO MODERNE ============= */
.modern-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gradient-hero);
    color: #fff;
    padding: 100px 0 60px;
}

/* Slideshow d'arrière-plan */
.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1.05);
}
.hero-slide.active {
    opacity: 0.35;
    animation: zoomSlow 20s ease-in-out infinite;
}
@keyframes zoomSlow {
    0%, 100% { transform: scale(1.05); }
    50%      { transform: scale(1.15); }
}

/* Overlay gradient */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(206,108,69,0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74,144,226,0.3) 0%, transparent 50%),
        linear-gradient(135deg, rgba(30,42,58,0.85) 0%, rgba(30,42,58,0.6) 100%);
    z-index: 1;
}

/* Formes flottantes animées */
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(206,108,69,0.3), rgba(206,108,69,0.1));
    backdrop-filter: blur(40px);
    animation: float 20s ease-in-out infinite;
}
.shape-1 { width: 200px; height: 200px; top: 10%; left: 5%;    animation-delay: 0s; }
.shape-2 { width: 150px; height: 150px; top: 60%; right: 10%;  animation-delay: -5s; background: linear-gradient(135deg, rgba(74,144,226,0.3), rgba(74,144,226,0.1)); }
.shape-3 { width: 100px; height: 100px; top: 30%; right: 20%;  animation-delay: -10s; }
.shape-4 { width: 80px;  height: 80px;  bottom: 15%; left: 20%; animation-delay: -15s; background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05)); }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(30px, -30px) rotate(90deg); }
    50%      { transform: translate(-20px, 20px) rotate(180deg); }
    75%      { transform: translate(-30px, -20px) rotate(270deg); }
}

/* Contenu hero */
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}
.hero-badge .pulse {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(40,167,69,0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(40,167,69,0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(40,167,69,0); }
    100% { box-shadow: 0 0 0 0 rgba(40,167,69,0); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}
.hero-title .gradient-text {
    background: linear-gradient(135deg, #ce6c45 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    max-width: 540px;
    animation: fadeInUp 1s ease-out;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease-out;
}
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary-modern {
    background: var(--gradient-1);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(206,108,69,0.4);
}
.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(206,108,69,0.5);
    color: #fff !important;
}
.btn-outline-modern {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline-modern:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    animation: fadeInUp 1.4s ease-out;
}
.hero-stat {
    border-left: 3px solid var(--primary);
    padding-left: 16px;
}
.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.hero-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.hero-illustration {
    position: relative;
    animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

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

/* Indicateurs de slideshow */
.slide-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.slide-dot {
    width: 30px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
}
.slide-dot.active {
    background: var(--primary);
    width: 50px;
}

/* Scroll indicator */
.scroll-down {
    position: absolute;
    bottom: 30px;
    right: 30px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    z-index: 3;
    writing-mode: vertical-rl;
    display: none;
}
@media (min-width: 1200px) {
    .scroll-down { display: block; }
}

/* ============= SECTION TRUST BAR ============= */
.trust-bar {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}
.trust-bar-inner {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    padding: 30px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
}
.trust-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.trust-text strong {
    display: block;
    color: var(--secondary);
    font-size: 16px;
    font-weight: 700;
}
.trust-text span {
    color: #777;
    font-size: 13px;
}

/* ============= SECTION TITLE ============= */
.section-title-modern {
    text-align: center;
    margin-bottom: 60px;
}
.section-title-modern .uptitle {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.section-title-modern h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 16px;
}
.section-title-modern p {
    color: #6c757d;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============= SERVICES MODERNE ============= */
.services-modern {
    padding: 100px 0;
    background: #fafbfc;
}
.service-card-modern {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(.2,.7,.4,1);
    border: 1px solid #eef1f5;
    height: 100%;
}
.service-card-modern::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.service-card-modern:hover::before { transform: scaleX(1); }

.service-icon-modern {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 24px;
    transition: all 0.4s ease;
}
.service-card-modern:hover .service-icon-modern {
    background: var(--gradient-1);
    color: #fff;
    transform: rotate(-10deg) scale(1.1);
}
.service-card-modern h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
}
.service-card-modern p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.service-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}
.service-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* ============= STATS SECTION ============= */
.stats-modern {
    padding: 80px 0;
    background: var(--gradient-hero);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.stats-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 70%);
}
.stat-modern {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}
.stat-modern .stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f4e3da 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
}
.stat-modern .stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 12px;
}

/* ============= WHY US ============= */
.why-us-modern {
    padding: 100px 0;
    background: #fff;
}
.why-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}
.why-card:hover {
    background: #fafbfc;
    transform: translateX(8px);
}
.why-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.why-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
}
.why-content p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.why-visual {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.why-visual img {
    width: 100%;
    height: auto;
    display: block;
}
.why-floating {
    position: absolute;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
}
.why-floating-1 {
    top: 20px; left: -20px;
    animation: floatY 4s ease-in-out infinite;
}
.why-floating-2 {
    bottom: 30px; right: -20px;
    animation: floatY 5s ease-in-out infinite;
    animation-delay: -2s;
}

/* ============= BLOG MODERNE ============= */
.blog-modern {
    padding: 100px 0;
    background: #fafbfc;
}
.blog-card-modern {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(.2,.7,.4,1);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.blog-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.blog-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.blog-card-modern:hover .blog-card-image img {
    transform: scale(1.1);
}
.blog-card-tag {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-meta {
    display: flex;
    gap: 16px;
    color: #999;
    font-size: 12px;
    margin-bottom: 12px;
}
.blog-card-modern h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}
.blog-card-modern h3 a { color: inherit; text-decoration: none; transition: color 0.2s; }
.blog-card-modern h3 a:hover { color: var(--primary); }
.blog-card-modern p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

/* ============= TESTIMONIALS MODERNE ============= */
.testimonials-modern {
    padding: 100px 0;
    background: #fff;
}
.testimonial-card {
    background: #fafbfc;
    border-radius: 20px;
    padding: 32px;
    position: relative;
    height: 100%;
    border: 1px solid #eef1f5;
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px; right: 20px;
    font-size: 80px;
    color: var(--primary);
    opacity: 0.1;
    line-height: 1;
    font-family: Georgia, serif;
}
.testimonial-stars {
    color: #ffc107;
    margin-bottom: 16px;
    font-size: 14px;
}
.testimonial-text {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #eef1f5;
}
.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.testimonial-author-info strong {
    display: block;
    color: var(--secondary);
    font-size: 14px;
}
.testimonial-author-info span {
    color: #999;
    font-size: 12px;
}

/* ============= CTA SECTION ============= */
.cta-modern {
    padding: 80px 0;
    background: var(--gradient-1);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.cta-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0,0,0,0.2) 0%, transparent 50%);
}
.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
}
.cta-modern h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
}
.cta-modern p {
    font-size: 1.05rem;
    margin-bottom: 32px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-modern .btn-modern {
    background: #fff;
    color: var(--primary) !important;
}
.cta-modern .btn-modern:hover {
    background: var(--secondary);
    color: #fff !important;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 991px) {
    .modern-hero { min-height: auto; padding: 120px 0 60px; text-align: center; }
    .hero-stats { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .hero-illustration { margin-top: 40px; max-width: 500px; margin-left: auto; margin-right: auto; }
    .why-floating-1, .why-floating-2 { position: static; margin: 10px 0; }
    .why-floating { display: inline-flex; }
}
@media (max-width: 575px) {
    .hero-stats { gap: 20px; }
    .hero-stat-value { font-size: 1.5rem; }
    .services-modern, .why-us-modern, .blog-modern, .testimonials-modern { padding: 60px 0; }
    .stats-modern { padding: 60px 0; }
    .stat-modern .stat-number { font-size: 2.2rem; }
}

/* Effets de scroll au reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
