/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size: 1rem;
	font-weight: normal;
	color: #000;
	line-height: 1.6;
	background-image: url(images/eclosions_jerome_dupre_la_tour_fond_04.gif);
	background-size: contain;
	background-repeat: repeat-x;
	background-position: top;
	background-color: #FFF;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

header {
    padding: 0rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-size: 1.5rem;
    font-weight: normal;
}

nav {
    margin-top: 0.5rem;
}

nav a {
    margin: 0 0.5rem;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}

a:hover, a:focus {
    background-color: #00FF00;
    color: white;
}

/* Grille responsive */
.oeuvres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.oeuvre-card {
	overflow: hidden;
	background: #FFF;
}

.oeuvre-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.oeuvre-card h2 {
    padding: 0.5rem;
    font-size: 1rem;
    font-weight: normal;
}

.oeuvre-card .description {
    padding: 0 0.5rem 0.5rem;
    font-size: 0.9rem;
    color: #666;
}


/* Conteneurs */
#conteneur {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

#conteneur_blocs, #conteneur_blocs_texte {
    width: 100%;
    text-align: center;
}

#conteneur_titre {
    width: 100%;
    text-align: center;
    clear: none;
    margin: 20px 0;
}

/* Blocs */
.bloc {
    margin: 10px 6px;
    background-color: #FFF;
    transition: transform 0.3s ease;
}

.bloc:hover {
    transform: translateY(-5px);
}

#bloc_index, #bloc_titre {
    width: 100%;
    max-width: 300px;
    float: left;
    text-align: left;
    margin: 10px 6px;
    height: auto;
    min-height: 280px;
}

#bloc_actus {
    width: 100%;
    max-width: 300px;
    float: left;
    text-align: left;
    margin: 10px 6px;
    min-height: 390px;
}

#bloc_rubrique {
    width: 100%;
    max-width: 200px;
    float: left;
    text-align: left;
    margin: 10px 6px;
    padding-right: 2px;
    clear: right;
}

#bloc_rubrique_large {
    width: 100%;
    max-width: 400px;
    float: left;
    text-align: left;
    margin: 10px 6px;
    padding-right: 2px;
    clear: right;
}

/* Texte défilant */
.messagedefilant {
    display: block;
    padding: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 60px;
    color: #F6F;
    background-color: rgba(255, 255, 255, 0.9);
}

.messagedefilant div {
    position: absolute;
    min-width: 100%;
}

.messagedefilant div span {
    position: relative;
    display: inline-block;
    font-size: 1.2rem;
    white-space: nowrap;
    top: 0;
    animation: defilement 60s linear infinite;
}

@keyframes defilement {
    0% { margin-left: 0; }
    100% { margin-left: -100%; }
}

/* Typos */
.typo_titres_01 {
    background: #000;
    color: #FFF;
    font-size: 1.2rem;
    padding: 5px 10px;
    display: inline-block;
}

.typo_titres_02 {
    background: #FFF;
    color: #000;
    font-size: 1.2rem;
    padding: 5px 10px;
    display: inline-block;
}

.typo_titres_03 {
    background: #F6F;
    color: #000;
    font-size: 1.2rem;
    padding: 5px 10px;
    display: inline-block;
}

.typo_titres_04 {
    color: #000;
    font-size: 2.5rem;
    text-align: center;
    margin: 10px 0;
}

.typo_titres_05 {
    background: #00FF00;
    color: #000;
    font-size: 1.2rem;
    text-align: left;
    padding: 5px 10px;
    display: inline-block;
}

.typo_menu {
    color: #000;
    font-size: 1.1rem;
    text-align: left;
    margin: 5px 0;
}

.typo_menu a {
    padding: 3px 8px;
    border-radius: 3px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    #bloc_index, #bloc_titre, #bloc_actus, #bloc_rubrique, #bloc_rubrique_large {
        width: 100%;
        float: none;
        margin: 10px 0;
    }

    .typo_titres_04 {
        font-size: 2rem;
    }

    .messagedefilant div span {
        font-size: 1rem;
    }
}

@media screen and (min-width: 992px) {
    .typo_titres_04 {
        font-size: 3rem;
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.8);
}

/* Images */
img {
    height: auto;
    max-width: 100%;
    margin-bottom: 0.5rem;
}

/* Adaptation mobile */
@media (max-width: 768px) {
    .oeuvres-grid {
        grid-template-columns: 1fr;
    }
}

.oeuvre-detail {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.oeuvre-detail h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.oeuvre-detail .meta {
    color: #666;
    margin-bottom: 1rem;
}

.oeuvre-images img {
    width: 100%;
    margin-bottom: 1rem;
}

.oeuvre-text {
    margin: 1rem 0;
    font-size: 1rem;
    line-height: 1.8;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: #333;
}