/* ==========================================================================
   RESPONSIVE DESIGN - ADAPTATION POUR TOUS TYPES D'ÉCRANS
   ========================================================================== */

/* ============================================
   TABLETTES (992px - 769px)
   ============================================ */
@media (max-width: 992px) {
    /* Réorganisation des grilles */
    .hero-content, 
    .about-grid, 
    .contact-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }

    .hero-text h1 { 
        font-size: 2.8rem; 
    }

    .slogan { 
        border-left: none; 
        border-top: 2px solid var(--orange); 
        padding: 15px 0 0 0; 
        max-width: 80%;
        margin: 20px auto;
    }

    .hero-buttons { 
        justify-content: center; 
    }

    .about-highlights { 
        text-align: left; 
        justify-items: center;
    }

    .photo-frame {
        width: 280px;
        height: 280px;
    }

    /* Navigation mobile */
    .hamburger { 
        display: block; 
    }

    .nav-links {
        position: absolute;
        top: 75px;
        left: -100%;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
        box-shadow: var(--shadow);
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active { 
        left: 0; 
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 8px 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .theme-toggle {
        padding: 8px 0;
    }

    /* Ajustements sections */
    section { 
        padding: 60px 0; 
    }

    .section-title {
        font-size: 1.8rem;
    }

    .timeline {
        padding-left: 20px;
        margin: 30px 10px 0 10px;
    }

    .timeline-dot {
        left: -27px;
        width: 10px;
        height: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-item .number {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }
}

/* ============================================
   PETITES TABLETTES & GRANDS TÉLÉPHONES (768px - 481px)
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    /* Hero */
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .slogan {
        font-size: 0.95rem;
        max-width: 90%;
    }

    .photo-frame {
        width: 220px;
        height: 220px;
    }

    .photo-frame::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* About */
    .about-grid {
        gap: 30px;
    }

    .about-highlights {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lead {
        font-size: 1rem;
    }

    .vision-card {
        padding: 25px;
    }

    /* Skills, Services, Projects */
    .skills-grid,
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-card {
        padding: 25px;
    }

    .service-card img,
    .project-card img {
        height: 160px;
    }

    .project-info {
        padding: 20px;
    }

    .project-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-outline-sm {
        text-align: center;
        padding: 8px 16px;
    }

    /* Timeline */
    .timeline {
        padding-left: 15px;
        margin: 20px 5px 0 5px;
    }

    .timeline-item {
        padding: 20px;
        margin-bottom: 30px;
    }

    .timeline-dot {
        left: -22px;
        top: 24px;
        width: 8px;
        height: 8px;
        border-width: 3px;
    }

    .timeline-item .date {
        font-size: 0.8rem;
    }

    .timeline-item h4 {
        font-size: 1.1rem;
    }

    /* Certifications */
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cert-card {
        padding: 20px 15px;
    }

    .cert-card i {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .cert-card h4 {
        font-size: 0.9rem;
    }

    .cert-card p {
        font-size: 0.8rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .stat-item .number {
        font-size: 2rem;
    }

    .stat-item p {
        font-size: 0.9rem;
    }

    /* Testimonials */
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-item {
        padding: 25px;
    }

    /* Contact */
    .contact-grid {
        gap: 30px;
    }

    .contact-info {
        padding: 25px;
    }

    .contact-info p {
        font-size: 0.9rem;
    }

    .social-links {
        justify-content: center;
        font-size: 1.3rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 12px;
        font-size: 0.9rem;
    }

    .contact-form textarea {
        height: 120px;
    }

    /* Footer */
    footer {
        padding: 40px 0 20px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    footer h3, 
    footer h4 {
        font-size: 1.1rem;
    }

    .footer-socials {
        justify-content: center;
        font-size: 1.1rem;
    }

    footer ul li {
        font-size: 0.85rem;
    }

    /* Animations */
    .fade-section {
        transform: translateY(20px);
    }
}

/* ============================================
   TÉLÉPHONES MOYENS (480px - 376px)
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    .section-title-center p {
        font-size: 0.9rem;
    }

    /* Navigation */
    .nav-container {
        height: 65px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hamburger span {
        width: 22px;
        height: 2.5px;
        margin: 4px 0;
    }

    .nav-links {
        top: 65px;
        padding: 30px 15px;
        gap: 15px;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 6px 0;
    }

    .theme-toggle {
        font-size: 1rem;
    }

    /* Hero */
    #hero {
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 40px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .badge {
        font-size: 0.7rem;
        padding: 3px 10px;
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 0.9rem;
        margin: 12px 0;
    }

    .slogan {
        font-size: 0.85rem;
        padding: 12px 0 0 0;
        max-width: 100%;
    }

    .photo-frame {
        width: 180px;
        height: 180px;
    }

    .photo-frame img {
        border-width: 4px;
    }

    .photo-frame::before {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
        border-width: 1.5px;
        animation-duration: 15s;
    }

    .hero-buttons {
        margin-top: 20px;
    }

    .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
        max-width: 240px;
        gap: 6px;
    }

    /* About */
    .lead {
        font-size: 0.95rem;
    }

    .vision-card h4 {
        font-size: 1.1rem;
    }

    .vision-card p {
        font-size: 0.9rem;
    }

    .vision-target {
        font-size: 0.9rem;
    }

    /* Skills */
    .skill-card h4 {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .skill-item span {
        font-size: 0.8rem;
    }

    .progress-bar {
        height: 6px;
    }

    /* Services & Projects */
    .service-card h4,
    .project-info h4 {
        font-size: 1rem;
        margin: 15px 15px 8px 15px;
    }

    .service-card p,
    .project-info p {
        font-size: 0.85rem;
        padding: 0 15px;
        margin-bottom: 15px;
    }

    .service-card img,
    .project-card img {
        height: 140px;
    }

    .btn-service {
        padding: 10px;
        margin: 0 15px 15px 15px;
        font-size: 0.85rem;
    }

    .project-info {
        padding: 15px;
    }

    .project-tech span {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .project-actions {
        gap: 6px;
    }

    .btn-outline-sm {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Timeline */
    .timeline-item {
        padding: 15px;
        margin-bottom: 25px;
    }

    .timeline-dot {
        left: -18px;
        top: 20px;
        width: 7px;
        height: 7px;
        border-width: 2px;
    }

    .timeline-item h4 {
        font-size: 1rem;
    }

    .timeline-item p {
        font-size: 0.85rem;
    }

    /* Certifications */
    .cert-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .cert-card {
        padding: 15px 10px;
    }

    .cert-card i {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .cert-card h4 {
        font-size: 0.8rem;
    }

    .cert-card p {
        font-size: 0.75rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-item .number {
        font-size: 1.8rem;
    }

    .stat-item p {
        font-size: 0.8rem;
    }

    /* Testimonials */
    .testimonial-item {
        padding: 20px;
    }

    .testimonial-item i {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .testimonial-item p {
        font-size: 0.85rem;
    }

    .testimonial-item h5 {
        font-size: 0.95rem;
    }

    /* Contact */
    .contact-form {
        gap: 12px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 10px;
        font-size: 0.85rem;
    }

    .contact-form textarea {
        height: 100px;
    }

    .contact-info {
        padding: 20px;
    }

    .contact-info h4 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .contact-info p {
        font-size: 0.85rem;
        gap: 10px;
        margin-bottom: 12px;
    }

    .social-links {
        font-size: 1.2rem;
        gap: 12px;
    }

    /* Footer */
    footer {
        padding: 30px 0 15px 0;
    }

    .footer-grid {
        gap: 25px;
    }

    footer h3 {
        font-size: 1rem;
    }

    footer h4 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    footer ul li {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .footer-socials {
        font-size: 1rem;
        gap: 12px;
    }
}

/* ============================================
   TRÈS PETITS TÉLÉPHONES (≤ 375px)
   ============================================ */
@media (max-width: 375px) {
    .container {
        padding: 0 8px;
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }

    .photo-frame {
        width: 150px;
        height: 150px;
    }

    .btn {
        max-width: 200px;
        padding: 7px 16px;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .cert-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cert-card {
        padding: 12px 8px;
    }

    .cert-card i {
        font-size: 1.2rem;
    }

    .cert-card h4 {
        font-size: 0.7rem;
    }

    .cert-card p {
        font-size: 0.65rem;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-item .number {
        font-size: 1.5rem;
    }

    .stat-item p {
        font-size: 0.7rem;
    }

    .contact-info {
        padding: 15px;
    }

    .contact-info p {
        font-size: 0.8rem;
    }

    .social-links {
        font-size: 1rem;
    }

    footer h3 {
        font-size: 0.9rem;
    }

    footer h4 {
        font-size: 0.85rem;
    }

    footer ul li {
        font-size: 0.75rem;
    }
}

/* ============================================
   ÉCRANS TRÈS LARGES (≥ 1400px)
   ============================================ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        padding: 0 40px;
    }

    section {
        padding: 110px 0;
    }

    .hero-text h1 {
        font-size: 4.5rem;
    }

    .photo-frame {
        width: 380px;
        height: 380px;
    }

    .section-title {
        font-size: 2.6rem;
    }

    .skills-grid,
    .services-grid,
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   PAYSAGE / ORIENTATION PAYSAGE (Mobile)
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 70px 0 30px 0;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .photo-frame {
        width: 150px;
        height: 150px;
    }

    .nav-links {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* ============================================
   IMPRESSION
   ============================================ */
@media print {
    .navbar,
    #hero .photo-frame::before,
    #particleCanvas {
        display: none !important;
    }

    .btn,
    .btn-service,
    .btn-outline-sm {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }

    .service-card,
    .project-card,
    .testimonial-item,
    .vision-card,
    .contact-info {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    #stats {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    .stat-item .number {
        color: #000 !important;
    }

    .fade-section {
        opacity: 1 !important;
        transform: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    section {
        padding: 30px 0 !important;
        page-break-inside: avoid;
    }

    .container {
        max-width: 100% !important;
    }
}