/* ==================== BOUTONS GLOBAUX ==================== */
.btn {
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    color: white !important;
    box-shadow: 0 4px 20px rgba(221, 153, 51, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(221, 153, 51, 0.45);
    color: white !important;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--accent-text) !important;
    border: 2px solid #DD9933;
}

.btn-secondary:hover {
    background: #DD9933;
    color: white !important;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(5px);
}

/* ==================== ANIMATIONS GLOBALES ==================== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes ripple {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}


/* ==================== SECTION 1 : HERO ==================== */
.hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 20px 48px;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease-out;
}

.hero-name {
    font-family: 'Abril Fatface', serif;
    font-size: 72px;
    color: var(--accent-text);
    line-height: 1.1;
    margin-bottom: 10px;
    animation: fadeInLeft 1s ease-out 0.2s both;
}

.hero-title {
    font-family: 'Abril Fatface', serif;
    font-size: 56px;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 25px;
    animation: fadeInLeft 1s ease-out 0.4s both;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 550px;
    animation: fadeInLeft 1s ease-out 0.6s both;
}

.hero-description strong {
    color: var(--accent-text);
}

html.dark-mode .hero-description strong {
    color: var(--accent-text);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    animation: fadeInLeft 1s ease-out 0.8s both;
}

/* Social Icons Hero */
.hero-social-icons {
    display: flex;
    gap: 15px;
    animation: fadeInLeft 1s ease-out 1s both;
}

.hero-social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.hero-social-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.hero-social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(221, 153, 51, 0.3);
}

.hero-social-icon:hover svg {
    fill: #DD9933;
}

/* Photo Hero */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.5s both;
}

.photo-container {
    position: relative;
}

.photo-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8dcc8 0%, #f6eedc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.photo-container::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border: 3px dashed #DD9933;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
    animation: rotate 30s linear infinite;
}

.photo-container::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border: 2px solid #DD9933;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

/* Badges flottants */
.floating-badge {
    position: absolute;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: float 3s ease-in-out infinite;
}

.floating-badge img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.badge-azure {
    top: 20px;
    right: -20px;
    animation-delay: 0s;
}

.badge-cisco {
    bottom: 60px;
    left: -40px;
    animation-delay: 1s;
}

.badge-linux {
    bottom: -10px;
    right: 40px;
    animation-delay: 2s;
}

.badge-windows {
    top: 10px;
    left: -30px;
    animation-delay: 3s;
}


/* ==================== SECTION 2 : COMPÉTENCES ==================== */
.competences-section {
    padding: 40px 20px 80px;
}

.section-title {
    font-family: 'Abril Fatface', serif;
    font-size: 72px;
    color: #DD9933;
    margin-bottom: 60px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.competences-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

/* Suppression des règles spécifiques grid-column pour le desktop car flexbox gère le centrage auto */

.competence-card {
    /* Desktop : 3 cartes par ligne (100% - 2 gaps de 30px) / 3 */
    width: calc((100% - 60px) / 3);
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.competence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.competence-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(221, 153, 51, 0.15);
}

.competence-card:hover::before {
    transform: scaleX(1);
}

.competence-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.competence-card:hover .competence-icon {
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
}

.competence-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.competence-card:hover .competence-icon img {
    filter: brightness(0) invert(1);
}

.competence-card.no-invert:hover .competence-icon img {
    filter: none;
}

.competence-title {
    font-family: var(--font-ui);
    font-size: 22px;
    font-weight: 700;
    color: #DD9933;
    margin-bottom: 15px;
}

.competence-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== SECTION 3 : PARCOURS ==================== */
.parcours-section {
    padding: 80px 20px;
}

.parcours-section .section-title {
    text-align: left;
    margin-bottom: 30px;
}

.intro-text {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 1000px;
    margin-left: 100px;
    margin-bottom: 60px;
    line-height: 1.8;
}

.intro-text strong {
    color: var(--text-primary);
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.stat-card {
    width: calc((100% - 40px) / 2);
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(221, 153, 51, 0.15);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.stat-icon svg {
    width: 48px;
    height: 48px;
    color: #111111;
}

.stat-number {
    font-family: 'Abril Fatface', serif;
    font-size: 56px;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-number .suffix {
    font-size: 36px;
    color: #DD9933;
}

.stat-label {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 600;
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ==================== SECTION 4 : VEILLE ==================== */
.veille-section {
    padding: 80px 20px;
}

.veille-section .section-title {
    text-align: left;
    margin-bottom: 40px;
}

.veille-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 60px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.veille-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(221, 153, 51, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.veille-card::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(221, 153, 51, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.veille-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    border-radius: 50%;
    position: relative;
    animation: pulse 3s ease-in-out infinite;
    z-index: 1;
}

.veille-icon::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid #DD9933;
    border-radius: 50%;
    opacity: 0.3;
    animation: ripple 3s ease-in-out infinite;
}

.veille-icon::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border: 1px solid #DD9933;
    border-radius: 50%;
    opacity: 0.15;
    animation: ripple 3s ease-in-out infinite 0.5s;
}

.veille-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.veille-text {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 35px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.veille-text strong {
    color: var(--text-primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 10px 20px;
    background: var(--bg-card-alt);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    color: white;
    transform: translateY(-3px);
}

.tag.highlight {
    background: linear-gradient(135deg, #DD9933 0%, #c4872d 100%);
    color: white;
}

/* ==================== RESPONSIVE ==================== */

/* Tablette portrait (jusqu'à 1024px) */
@media (max-width: 1024px) {

    /* Grille des compétences : 3 colonnes en haut, 2 centrées en bas */
    .competences-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .competence-card {
        padding: 30px 20px;
    }

    .competence-title {
        font-size: 20px;
    }

    .competence-description {
        font-size: 16px;
    }

    .bottom-row {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        gap: 20px;
    }

    /* Badges flottants - taille fixe pour éviter l'étirement */
    .floating-badge {
        font-size: 12px;
        padding: 8px 14px;
        white-space: nowrap;
    }

    .floating-badge img {
        width: 18px;
        height: 18px;
    }

    /* Repositionner les badges pour tablette */
    .badge-azure {
        top: 15px;
        right: -25px;
    }

    .badge-windows {
        top: 10px;
        left: -35px;
    }

    .badge-cisco {
        bottom: 60px;
        left: -40px;
    }

    .badge-linux {
        bottom: -10px;
        right: 30px;
    }
}

/* ==================== TABLETTE (601px à 1000px) ==================== */
/* ==================== TABLETTE (601px à 1000px) ==================== */
@media (min-width: 601px) and (max-width: 1000px) {

    /* Layout Flexbox : 2 cartes par ligne */
    .competence-card {
        width: calc((100% - 30px) / 2);
    }

    /* La 5ème carte sera automatiquement centrée par justify-content: center du parent */
}

@media (max-width: 900px) {

    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-name {
        font-size: 56px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-social-icons {
        justify-content: center;
    }

    .photo-placeholder {
        width: 280px;
        height: 280px;
    }

    .photo-container::before {
        width: 310px;
        height: 310px;
    }

    .photo-container::after {
        width: 350px;
        height: 350px;
    }

    .floating-badge {
        font-size: 11px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .badge-azure {
        top: 15px;
        right: -15px;
    }

    .badge-cisco {
        bottom: 50px;
        left: -25px;
    }

    .badge-linux {
        bottom: -5px;
        right: 25px;
    }

    /* Windows reste à GAUCHE, pas à droite */
    .badge-windows {
        top: 10px;
        left: -25px;
        right: auto;
    }

    /* Sections */
    .section-title {
        font-size: 56px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid .stat-card:last-child {
        grid-column: span 2;
        max-width: 400px;
        margin: 0 auto;
    }

    .stat-number {
        font-size: 44px;
    }

    .stat-number .suffix {
        font-size: 28px;
    }

    .intro-text {
        margin-left: 0;
        text-align: center;
    }

    .veille-card {
        padding: 50px 40px;
    }

    .veille-icon {
        width: 100px;
        height: 100px;
    }

    .veille-icon img {
        width: 50px;
        height: 50px;
    }

    .veille-icon::before {
        width: 120px;
        height: 120px;
    }

    .veille-icon::after {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 600px) {

    /* Mobile : 1 carte par ligne */
    .competence-card {
        width: 100%;
        margin: 0;
    }



    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid .stat-card:last-child {
        grid-column: span 1;
        max-width: none;
        width: 100%;
    }

    .stat-card {
        width: 100%;
    }

    .section-title {
        font-size: 32px;
        padding: 0 15px;
        text-align: center;
    }

    .parcours-section .section-title,
    .veille-section .section-title {
        text-align: center;
    }

    /* IMPORTANT: Supprimer le margin-left qui cause le débordement */
    .intro-text {
        margin-left: 0;
        padding: 0 15px;
        text-align: center;
        font-size: 16px;
    }

    .competence-card {
        padding: 30px 25px;
    }

    .stat-card {
        padding: 28px 20px;
    }

    .stat-number {
        font-size: 40px;
    }

    .buttons-container {
        flex-direction: column;
        align-items: center;
    }

    .buttons-container .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .veille-card {
        padding: 35px 20px;
    }

    .veille-icon {
        width: 80px;
        height: 80px;
    }

    .veille-icon img {
        width: 40px;
        height: 40px;
    }

    .veille-text {
        font-size: 16px;
        padding: 0 10px;
    }

    .tag {
        padding: 8px 14px;
        font-size: 12px;
    }

    .tags-container {
        padding: 0 10px;
    }
}

@media (max-width: 500px) {
    .hero-name {
        font-size: 42px;
    }

    .hero-title {
        font-size: 32px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Garder les badges visibles mais plus petits */
    .floating-badge {
        font-size: 10px;
        padding: 6px 10px;
        max-width: 80px;
    }

    .floating-badge img {
        width: 16px;
        height: 16px;
        max-width: 16px;
        max-height: 16px;
    }

    .badge-azure {
        top: 10px;
        right: -5px;
    }

    .badge-cisco {
        bottom: 50px;
        left: -15px;
    }

    .badge-linux {
        bottom: -5px;
        right: 20px;
    }

    .badge-windows {
        top: 5px;
        left: -15px;
        max-width: 85px;
    }

    .hero-social-icons {
        margin-bottom: 30px;
    }
}
