/* ==========================================================================
   CSS PRINCIPAL - SITE PACAILLOU V2
   ========================================================================== */

/*
   Reset et styles de base
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
   Variables CSS globales
   Définition des couleurs, dimensions et espacements utilisés sur tout le site.
*/
:root {
    --primary-orange: #FF6135;
    --pacaillou-green: #48BB60;
    --pacaillou-blue: #5575FE;
    --cream-bg: rgb(255, 255, 255);
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-orange), #ff7849);
    
    /* Variables de mise en page */
    --nav-h: 48px;
    --menu-panel-h: 240px;
    
    /* Hauteurs de section (Hero) */
    --hero-height-desktop:80vh;
    --hero-height-tablet: 50vh;
    --hero-height-mobile: 42vh;
    
    /* Espacements (Paddings) dynamiques pour le Hero */
    --hero-padding-top-desktop: calc(var(--nav-h) + 24px);
    --hero-padding-top-tablet: calc(var(--nav-h) + 16px);
    --hero-padding-top-mobile: calc(var(--nav-h) + 10px);
    --hero-padding-top-mobile-menu: calc(var(--nav-h) + var(--menu-panel-h));
}

html {
    scroll-behavior: smooth; /* Défilement fluide */
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    padding-top: var(--nav-h); /* Compensation pour la barre de navigation fixe */
    background: var(--cream-bg);
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Overlay sombre quand le menu mobile est ouvert */
body.menu-open::before {
    content: "";
    position: fixed;
    top: 0; left:0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
}

/*
   ==========================================================================
   HEADER & NAVIGATION
   ==========================================================================
*/

/* Logo dans le header */
.logo-header {
    /*background: var(--white);*/
    padding: 0.5rem 0;
    text-align: left;
    /*box-shadow: 0 2px 20px var(--shadow);*/
    position: relative;
    z-index: 1000;
}

.logo-header img {
    height: 60px;
    transition: transform 0.3s ease;
}

.logo-header img:hover {
    transform: scale(1.05);
}

/* Barre de navigation fixe (sticky) */
.nav-bar {
    background: var(--gradient);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(255, 97, 53, 0.3);
}

.nav-container {
    /*max-width: 1200px;*/
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 1.5rem;
}

/* Boutons de navigation */
.nav-btn {
    display: inline-block;
    position: relative;
    z-index: 1; 
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.3rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    overflow: hidden;
}

/* Effet de survol sur les boutons */
.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    border-radius: 25px; /* ajuste à la forme du bouton */
    z-index: 0;
}

.nav-btn:hover::before {
    left: 0;
}

.nav-btn:hover {
    background: var(--white);
    color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: var(--white);
    color: var(--primary-orange);
    border-color: var(--white);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Menu burger (Mobile) */
.burger {
    background: none;
    text-align: right;
    border: none;
    cursor: pointer;
    position:absolute;
    right:5%;
    bottom: 45%;
    display: none; /* masqué par défaut, visible seulement en mobile */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    padding: 0;
    z-index: 1001; /* au-dessus du menu qui est z-index: 1000 */
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animation de transformation du burger en croix */
.burger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  transform-origin: center;
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  transform-origin: center;
}

/* --- Navigation Responsive Mobile --- */
@media (max-width: 768px) {

    .burger {
    display:flex; /* affiche le menu burger uniquement sur mobile */
  }
    bezier-container {
    display:none; /* masque courbes bézier sur mobile */
  }

  .nav-container {
    justify-content: space-between;
  }

  .nav-links {
    flex-direction: column;
    background: var(--gradient);
    position: fixed;
    top: var(--nav-h);
    right: 0;
    width: 40%;
    height: 60vh;
    border-radius: 0 0 0 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transform: translateX(100%);
    /*transition: transform 0.3s ease-in-out;*/
    z-index: 998;
  }

  .nav-links.active {
    transform: translateX(0);
    /*display: flex;*/
    animation: slideDown 0.3s ease;
  }
}

/* Animation d'apparition du menu mobile */
@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/*
   ==========================================================================
   CONTENU PRINCIPAL & SECTIONS
   ==========================================================================
*/

/* Container principal */
.main-container {
    /*max-width: 1400px;*/
    margin: 0 auto;
    padding: 0 0rem;
}

/* Sections génériques */
.section {
    min-height: 100vh;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Contenu des sections avec animation d'apparition */
.section-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    width: 100%;
    /*max-width: 1200px;*/
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.8s ease;
    position: relative;
    overflow: hidden;
}

.section-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    border-radius: 20px 20px 0 0;
}

.section-content.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Titres de niveau 2 */
.section h2 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Titres de niveau 3 */
.section h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.2rem;
    color: black;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
}


.section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Bloc Image/Texte côte à côte */
.section-image {
    display: flex;
    align-items: center;
    gap: 20px
}

.section-image picture,
.section-image img {
    flex: 0 0 30%;
    max-width: 30%;
    height: auto;
    transition: transform 0.3s ease;
}

.section-image img:hover {
    transform:scale(1.05);
}

/* Liste de captures d'écran (Image à gauche, texte à droite) */
.screenshots-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.screenshot-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}


.screenshot-media {
    flex: 0 0 60%;
    max-width: 1600px;
}

.screenshot-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.screenshot-text {
    flex: 1 1 60%;
}

.icon-media {
    flex : 0 0 20%;
    max-width: 220px;
    padding-left: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-media img {
    width: 256px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Responsive pour les screenshots */
@media (max-width: 768px) {
    .screenshot-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .screenshot-media {
        max-width: 90%;
        flex: unset;
    }

    .screenshot-text {
        width: 100%;
    }

    .icon-media img {
        width: 80%;
        max-width: 80%;
        height: auto;
        object-fit: contain;
        display: block;
    }
}

.section-image h3 {
    flex: 1;
    margin: 0;
    text-align: left;
}

/*
   ==========================================================================
   HERO SECTION (ACCUEIL)
   ==========================================================================
*/

.bezier-container {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.bezier-path {
    fill: none;
    stroke-width: 10;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.bezier-path:nth-child(1) { stroke: var(--pacaillou-blue); }
.bezier-path:nth-child(2) { stroke: var(--pacaillou-green); }
.bezier-path:nth-child(3) { stroke: var(--primary-orange); }

#presentation {
    min-height: var(--hero-height-desktop);
    padding-top: var(--hero-padding-top-desktop);
    padding-bottom: 3rem;
    background: var(--white);
}

#presentation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="25" cy="25" r="1" fill="rgba(255,97,53,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,97,53,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,97,53,0.03)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,97,53,0.03)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    text-align: center;
    padding: 1rem 2rem;
    z-index: 1;
}

.hero-title {
    font-family: 'Archivo Black';
    font-size: 3.5rem;
    color: black;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--dark-text);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Bouton d'appel à l'action (CTA) */
.cta-button {
    background: var(--gradient);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(255, 97, 53, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 97, 53, 0.6);
}

/*
   ==========================================================================
   FORMULAIRES
   ==========================================================================
*/

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--dark-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 15px rgba(255, 97, 53, 0.2);
    transform: scale(1.02);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 97, 53, 0.4);
}

/*
   ==========================================================================
   MEDIA QUERIES (RESPONSIVE GLOBAL)
   ==========================================================================
*/

@media (max-width:1024px) {
    #presentation {
        min-height: var(--hero-height-tablet);
        padding-top: var(--hero-padding-top-tablet);
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        padding: 0.2rem 1.5rem;
        margin: 0.2rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .section h3 {
        font-size: 1.5rem;
    }

    .section-content {
        padding: 1rem;
    }

    .section-image {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-image picture,
    .section-image img {
        max-width: 80%;
        flex: unset;
    }

    .section-image h3 {
        margin-top: 1rem;
        text-align: center;
    }

    #presentation {
        min-height: var(--hero-height-mobile);
        padding-top: var(--hero-padding-top-mobile);
        padding-bottom: 1.5rem;
    }

    /*Pour faire descendre le hero en même temps que le menu burger s'ouvre*/
    /*body.menu-open #presentation {
        padding-top: var(--hero-padding-top-mobile-menu);
        transition: padding-top 0.3s ease;
    }*/
}

@media (max-width: 480px) {
    body {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .section h3 {
        font-size: 1.2rem;
    }

    .section-content {
        padding: 1rem;
        margin: 0.5rem;
    }

    .section-image h3 {
        text-align: center;
    }
}

/*@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #f0f0f0;
    }
}*/

/*
   ==========================================================================
   ANIMATIONS & EFFETS
   ==========================================================================
*/

/* Animation de chargement */
.loading {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Particules flottantes (arrière-plan) */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-orange);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}


/* Scroll margin pour compenser la navbar fixe lors du clic sur une ancre */
section{
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

/*
   ==========================================================================
   FOOTER
   ==========================================================================
*/
footer {
    background: var(--dark-text);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-orange);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
