/* ========================================
   STYLES RESPONSIVE POUR LE PORTFOLIO
   ======================================== */

/* ========================================
   BREAKPOINTS
   ======================================== */

/* ========================================
   SECTION CONTACT - RESPONSIVE
   ======================================== */

/* Mobile - Contact items en colonne */
@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-lg);
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto;
        font-size: var(--font-size-xl);
    }
    
    .contact-details {
        text-align: center;
    }
    
    .contact-label {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs);
    }
    
    .contact-value {
        font-size: var(--font-size-base);
        word-break: break-all;
    }
    
    .contact-info-title {
        font-size: var(--font-size-xl);
        text-align: center;
        margin-bottom: var(--spacing-xl);
    }
}

/* Tablette - Contact items optimisés */
@media (min-width: 769px) and (max-width: 991px) {
    .contact-item {
        padding: var(--spacing-lg);
    }
    
    .contact-icon {
        width: 55px;
        height: 55px;
        font-size: var(--font-size-lg);
    }
    
    .contact-info-title {
        font-size: var(--font-size-2xl);
    }
}

/* Desktop - Contact items avec plus d'espace */
@media (min-width: 992px) {
    .contact-item {
        padding: var(--spacing-xl);
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-xl);
    }
}

/* ========================================
   SECTION CONTACT - LAYOUT RESPONSIVE
   ======================================== */

/* Mobile - Contact en colonne */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
        gap: var(--spacing-xl);
    }
    
    .contact-form {
        order: 2;
    }
    
    .contact-info {
        order: 1;
    }
    
    .contact-info-title {
        font-size: var(--font-size-xl);
        text-align: center;
    }
}

/* Tablette - Contact optimisé */
@media (min-width: 769px) and (max-width: 991px) {
    .contact-content {
        gap: var(--spacing-xl);
    }
    
    .contact-form {
        flex: 1;
    }
    
    .contact-info {
        flex: 1;
    }
}

/* Desktop - Contact côte à côte */
@media (min-width: 992px) {
    .contact-content {
        display: flex;
        gap: var(--spacing-2xl);
        align-items: flex-start;
    }
    
    .contact-form {
        flex: 2;
    }
    
    .contact-info {
        flex: 1;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
        padding: 0 1rem;
    }
    
    /* Header */
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--primary-color);
    }
    
    .navbar-nav {
        gap: 1.5rem;
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Timeline */
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-marker {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .timeline-content {
        width: 100%;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    /* Header */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero {
        padding-top: 70px;
        min-height: 90vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        width: 200px;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-container {
        width: 200px;
        height: 200px;
    }
    
    .profile-photo {
        font-size: 80px;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-form-container {
        padding: 1rem;
    }
    
    /* Timeline */
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 50px;
    }
    
    .timeline-marker {
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .timeline-content {
        width: 100%;
        padding: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Header */
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.3rem;
        font-weight: 800;
        color: var(--primary-color);
    }
    
    .navbar-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Hero */
    .hero {
        padding-top: 60px;
        min-height: 80vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .image-container {
        width: 200px;
        height: 200px;
    }
    
    .profile-image {
        font-size: 80px;
    }
    
    /* Sections */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Skills */
    .skills {
        padding: 2rem 0;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    /* Projects */
    .projects {
        padding: 2rem 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        width: 150px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .project-card {
        margin: 0 0.5rem;
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    /* About */
    .about {
        padding: 2rem 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .about-title {
        font-size: 1.5rem;
    }
    
    .about-description {
        font-size: 0.9rem;
    }
    
    .profile-container {
        width: 150px;
        height: 150px;
    }
    
    .profile-photo {
        font-size: 60px;
    }
    
    .about-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Timeline */
    .timeline {
        padding: 2rem 0;
    }
    
    .timeline-container::before {
        left: 15px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 40px;
        margin-bottom: 1.5rem;
    }
    
    .timeline-marker {
        left: 15px;
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .timeline-content {
        width: 100%;
        padding: 0.75rem;
    }
    
    .timeline-title {
        font-size: 1rem;
    }
    
    .timeline-description {
        font-size: 0.8rem;
    }
    
    /* Contact */
    .contact {
        padding: 2rem 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-form-container {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .contact-info {
        gap: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-label {
        font-size: 0.9rem;
    }
    
    .contact-value {
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .footer-subtitle {
        font-size: 1rem;
    }
    
    .footer-description {
        font-size: 0.8rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .copyright {
        font-size: 0.7rem;
    }
}

/* ========================================
   MENU MOBILE
   ======================================== */

@media (max-width: 768px) {
    .navbar-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .navbar-nav.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-nav .nav-item {
        margin: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: var(--border-radius);
        transition: var(--transition-fast);
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--bg-secondary);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* ========================================
   ORIENTATION LANDSCAPE
   ======================================== */

@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .image-container {
        width: 150px;
        height: 150px;
    }
    
    .profile-image {
        font-size: 60px;
    }
}

/* ========================================
   IMPRESSION
   ======================================== */

@media print {
    .header,
    .footer,
    .navbar-actions,
    .hero-buttons,
    .project-filters,
    .contact-form-container,
    .social-links {
        display: none !important;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
    }
    
    .section-title {
        color: #000 !important;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .timeline-item {
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */

/* Réduction des animations pour les utilisateurs qui préfèrent */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
    
    .skill-progress {
        transition: none;
    }
}

/* Mode sombre (si implémenté) */
@media (prefers-color-scheme: dark) {
    /* Variables pour le mode sombre */
    :root {
        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-card: #1e293b;
        --border-color: #334155;
    }
}

/* ========================================
   UTILITAIRES RESPONSIVE
   ======================================== */

/* Masquage/affichage selon la taille d'écran */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-grid { display: grid !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-grid { display: grid !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-grid { display: grid !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
    .d-xl-grid { display: grid !important; }
}

/* Textes responsives */
.text-responsive {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
}

.title-responsive {
    font-size: clamp(1.5rem, 5vw, 3rem);
}

/* Espacements responsives */
.p-responsive {
    padding: clamp(1rem, 3vw, 2rem);
}

.m-responsive {
    margin: clamp(1rem, 3vw, 2rem);
}

/* Largeurs responsives */
.w-responsive {
    width: clamp(200px, 50vw, 400px);
}

/* Hauteurs responsives */
.h-responsive {
    height: clamp(200px, 30vh, 400px);
}
